/* ===================================
   BART KALI - Centered Quad Layout v2
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@500;600;700&family=Playfair+Display:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-name: 'Josefin Sans', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-dark: #0c0c0c;
  --bg-tile: #131313;
  --text-light: #ffffff;
  --text-muted: rgba(255,255,255,0.7);
  --blue: #3b82f6;
  --amber: #f59e0b;
  --green: #10b981;
  --purple: #ef4444;
  --radius: 12px;
  --gap: 1rem;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap);
}

.container {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto 1fr auto;
  gap: var(--gap);
  padding: var(--gap);
}

/* ---- Tile Row ---- */
.tile-row {
  display: contents;
}

/* ---- Individual Tile ---- */
.tile {
  flex: 1;
  background: var(--bg-tile);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  min-height: 0;
  transition: transform 0.3s;
}

.tile:hover { transform: translateY(-2px); }

/* Outer corner borders */
.tile-web {
  background: linear-gradient(to top left, var(--bg-dark) 40%, #1a1a1a);
  border-top: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
}
.tile-photo {
  background: linear-gradient(to top right, var(--bg-dark) 40%, #1a1a1a);
  border-top: 2px solid var(--amber);
  border-right: 2px solid var(--amber);
}
.tile-content {
  background: linear-gradient(to bottom left, var(--bg-dark) 40%, #1a1a1a);
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
}
.tile-brand {
  background: linear-gradient(to bottom right, var(--bg-dark) 40%, #1a1a1a);
  border-bottom: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
}

/* Hover: switch outer borders to dashed */
.tile-web:hover {
  border-top-style: dashed;
  border-left-style: dashed;
}
.tile-photo:hover {
  border-top-style: dashed;
  border-right-style: dashed;
}
.tile-content:hover {
  border-bottom-style: dashed;
  border-left-style: dashed;
}
.tile-brand:hover {
  border-bottom-style: dashed;
  border-right-style: dashed;
}

.tile-number {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.tile-web .tile-number { color: var(--blue); }
.tile-photo .tile-number { color: var(--amber); }
.tile-content .tile-number { color: var(--green); }
.tile-brand .tile-number { color: var(--purple); }

.tile h2 {
  font-family: var(--font-name);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0;
}

.tile p {
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 40ch;
}

/* Corner alignment */
.tile-web,
.tile-photo {
  justify-content: flex-start;
  padding-top: 0.6rem;
}

.tile-content,
.tile-brand {
  justify-content: flex-end;
  padding-bottom: 1.5rem;
}

.tile-photo,
.tile-brand {
  text-align: right;
  align-items: flex-end;
}

.tile-photo p,
.tile-brand p {
  max-width: 42ch;
}

.tile p a,
.tile p a:visited,
.tile p a:hover {
  color: var(--text-light) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.tile p a:hover { opacity: 0.7; }

.tile-brand p a:hover {
  opacity: 0.7;
}

/* ---- Center Name ---- */
.name-block {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 0 0;
}

.name-block h1 {
  font-family: var(--font-name);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-light);
  text-align: center;
  text-shadow: 0 0 30px rgba(255,255,255,0.12), 0 0 60px rgba(255,255,255,0.06);
}

/* ---- Footer line ---- */
.foot-line {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0 0 0.5rem;
  color: rgba(255,255,255,0.15);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  html, body {
    overflow: auto;
    display: block;
  }

  body {
    padding: 0.75rem;
  }

  .container {
    height: auto;
    min-height: 100vh;
    gap: 0.8rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 0.75rem;
  }

  .tile-row {
    display: contents;
  }

  .tile {
    padding: 0.8rem 1.2rem;
    justify-content: flex-start !important;
  }

  .tile-content,
  .tile-brand {
    padding-bottom: 1.3rem;
  }

  .tile-number {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
  }

  .tile h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }

  .tile p {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: none;
  }

  .name-block {
    padding: 1rem 0;
  }

  .name-block h1 {
    font-size: 3.2rem;
  }

  .foot-line {
    padding: 0.5rem 0 0;
  }
}
