/* =========================================================
   MDS 2024 TICKETING — PROJECT DETAIL
   Matches BATINARA Safety Net visual language
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #090b0d;
  --bg-soft: #0f1215;
  --panel: #121519;
  --panel-2: #171a1f;
  --text: #f4f1ec;
  --muted: #939aa3;
  --line: rgba(255,255,255,.11);

  --accent: #ff4f9a;
  --accent-soft: rgba(255,79,154,.12);
  --accent-line: rgba(255,79,154,.34);

  --max: 1380px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 14% 10%,
      rgba(255,79,154,.09),
      transparent 28%
    ),
    radial-gradient(
      circle at 90% 18%,
      rgba(255,255,255,.035),
      transparent 24%
    );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  opacity: .16;

  background-image:
    linear-gradient(
      rgba(255,255,255,.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.025) 1px,
      transparent 1px
    );

  background-size: 60px 60px;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width:
    min(
      var(--max),
      calc(100% - 56px)
    );
  margin: 0 auto;
}

/* =========================================================
   NAV
========================================================= */

.project-nav {
  position: relative;
  z-index: 20;

  border-bottom:
    1px solid var(--line);
}

.nav-inner {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.brand {
  font-family:
    "Fraunces",
    serif;

  font-size: 1.75rem;
  font-weight: 600;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;

  gap: 28px;
}

.nav-links a {
  color: var(--muted);

  font-family:
    "DM Mono",
    monospace;

  font-size: .75rem;
  letter-spacing: .055em;

  transition:
    color .2s ease;
}

.nav-links a:hover {
  color: white;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  padding:
    82px 0 90px;
}

.hero-grid {
  display: grid;

  grid-template-columns:
    minmax(0,1.03fr)
    minmax(420px,.97fr);

  gap: 58px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .72rem;
  letter-spacing: .09em;
}

.hero h1 {
  max-width: 810px;

  margin-top: 18px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      5rem,
      7.8vw,
      8.3rem
    );

  line-height: .82;
  letter-spacing: -.055em;
  font-weight: 600;
}

.hero h1 span {
  display: block;

  color: var(--accent);

  font-style: italic;
  font-weight: 500;
}

.hero h2 {
  max-width: 750px;

  margin-top: 30px;

  color: #d4d7db;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      1.6rem,
      2.5vw,
      2.7rem
    );

  line-height: 1.15;
  font-weight: 500;
}

.hero-description {
  max-width: 680px;

  margin-top: 24px;

  color: var(--muted);

  font-size: 1.04rem;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 28px;

  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

.hero-meta span,
.stack-list span {
  padding:
    8px 10px;

  border:
    1px solid var(--line);

  color: #bdc2c8;

  font-family:
    "DM Mono",
    monospace;

  font-size: .65rem;
  letter-spacing: .055em;
}

.hero-actions {
  margin-top: 32px;

  display: flex;
  flex-wrap: wrap;

  gap: 11px;
}

.button {
  min-height: 48px;

  padding:
    0 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid var(--line);

  font-family:
    "DM Mono",
    monospace;

  font-size: .72rem;
  letter-spacing: .045em;

  transition:
    transform .2s ease,
    background .2s ease,
    border-color .2s ease;
}

.button:hover {
  transform:
    translateY(-2px);
}

.button-primary {
  border-color:
    var(--accent);

  background:
    var(--accent);

  color: #090b0d;
  font-weight: 500;
}

.button-secondary {
  background:
    rgba(255,255,255,.018);
}

.button-secondary:hover {
  border-color:
    rgba(255,255,255,.26);
}

.hero-visual {
  min-width: 0;

  overflow: hidden;

  border:
    1px solid var(--line);

  background:
    #0e1114;
}

.visual-topbar,
.code-topbar {
  min-height: 42px;

  padding:
    0 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  border-bottom:
    1px solid var(--line);

  color: #747b84;

  font-family:
    "DM Mono",
    monospace;

  font-size: .62rem;
  letter-spacing: .07em;
}

.hero-visual img {
  width: 100%;
  min-height: 500px;

  display: block;

  object-fit: contain;

  padding: 24px;

  background:
    linear-gradient(
      145deg,
      #121519,
      #0c0e11
    );
}

/* =========================================================
   FACTS
========================================================= */

.facts-strip {
  border-top:
    1px solid var(--line);

  border-bottom:
    1px solid var(--line);
}

.facts-grid {
  display: grid;

  grid-template-columns:
    repeat(4,1fr);
}

.fact {
  min-height: 130px;

  padding:
    28px 26px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  border-right:
    1px solid var(--line);
}

.fact:last-child {
  border-right: 0;
}

.fact span {
  color: #69717a;

  font-family:
    "DM Mono",
    monospace;

  font-size: .62rem;
  letter-spacing: .075em;
}

.fact strong {
  margin-top: 18px;

  font-family:
    "Fraunces",
    serif;

  font-size: 1.42rem;
  font-weight: 500;
}

/* =========================================================
   GLOBAL SECTION
========================================================= */

.section {
  padding:
    108px 0;

  border-bottom:
    1px solid var(--line);
}

.section-panel {
  background:
    #0d1013;
}

.section-heading h2 {
  max-width: 830px;

  margin-top: 12px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      3rem,
      4.5vw,
      5rem
    );

  line-height: .94;
  letter-spacing: -.035em;
  font-weight: 500;
}

.section-heading > p,
.section-heading.wide > p {
  max-width: 720px;

  margin-top: 22px;

  color: var(--muted);

  line-height: 1.8;
}

.section-heading.wide {
  max-width: 960px;
}

.split-section {
  display: grid;

  grid-template-columns:
    minmax(0,.9fr)
    minmax(360px,1.1fr);

  gap: 80px;
}

.section-copy {
  max-width: 690px;

  justify-self: end;
}

.section-copy > p {
  color: #a8afb6;

  font-size: 1.03rem;
  line-height: 1.85;
}

.section-copy > p + p {
  margin-top: 20px;
}

.inline-note {
  margin-top: 34px;

  padding-top: 20px;

  border-top:
    1px solid var(--line);
}

.inline-note span {
  display: block;

  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .64rem;
  letter-spacing: .075em;
}

.inline-note strong {
  display: block;

  max-width: 610px;

  margin-top: 10px;

  font-family:
    "Fraunces",
    serif;

  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 500;
}

/* =========================================================
   ARCHITECTURE
========================================================= */

.architecture-grid {
  margin-top: 48px;

  display: grid;

  grid-template-columns:
    repeat(9,auto);

  align-items: stretch;
}

.architecture-card {
  width: 190px;
  min-height: 255px;

  padding: 25px 22px;

  border:
    1px solid var(--line);

  background:
    #111418;
}

.architecture-card > span {
  color: #69717a;

  font-family:
    "DM Mono",
    monospace;

  font-size: .66rem;
}

.architecture-card h3 {
  margin-top: 42px;

  font-family:
    "Fraunces",
    serif;

  font-size: 1.7rem;
  line-height: 1;
  font-weight: 500;
}

.architecture-card p {
  margin-top: 15px;

  color: var(--muted);

  font-size: .88rem;
  line-height: 1.65;
}

.architecture-arrow {
  min-width: 34px;

  display: grid;
  place-items: center;

  color: #4f565d;
}

.accent-card {
  border-color:
    var(--accent-line);

  background:
    var(--accent-soft);
}

.safety-card {
  border-color:
    rgba(255,255,255,.22);
}

.safety-card h3 {
  color: var(--accent);
}

/* =========================================================
   DESIGN CARDS
========================================================= */

.design-grid {
  margin-top: 48px;

  display: grid;

  grid-template-columns:
    repeat(2,1fr);

  gap: 14px;
}

.design-card {
  min-height: 310px;

  padding: 30px;

  border:
    1px solid var(--line);

  background:
    rgba(255,255,255,.015);
}

.design-index {
  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .68rem;
}

.design-card h3 {
  margin-top: 54px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      2.1rem,
      3.1vw,
      3.4rem
    );

  line-height: .96;
  font-weight: 500;
}

.design-card p {
  max-width: 570px;

  margin-top: 17px;

  color: var(--muted);

  line-height: 1.75;
}

/* =========================================================
   CONFIG
========================================================= */

.config-section {
  background:
    #0b0e11;
}

.config-grid {
  display: grid;

  grid-template-columns:
    .8fr 1.2fr;

  gap: 75px;
}

.config-table {
  border-top:
    1px solid var(--line);
}

.config-table > div {
  min-height: 73px;

  display: grid;

  grid-template-columns:
    210px 1fr;

  gap: 25px;

  align-items: center;

  border-bottom:
    1px solid var(--line);
}

.config-table span {
  color: #656d75;

  font-family:
    "DM Mono",
    monospace;

  font-size: .63rem;
  letter-spacing: .065em;
}

.config-table strong {
  color: #d8dce0;

  font-family:
    "DM Mono",
    monospace;

  font-size: .78rem;
  font-weight: 500;
}

/* =========================================================
   WORKFLOW
========================================================= */

.workflow-list {
  margin-top: 48px;

  display: grid;
}

.workflow-row {
  min-height: 430px;

  display: grid;

  grid-template-columns:
    .85fr 1.15fr;

  border-top:
    1px solid var(--line);
}

.workflow-row:last-child {
  border-bottom:
    1px solid var(--line);
}

.workflow-row.reverse {
  grid-template-columns:
    1.15fr .85fr;
}

.workflow-row.reverse
.workflow-copy {
  order: 2;
}

.workflow-row.reverse
.workflow-image,
.workflow-row.reverse
.workflow-code {
  order: 1;

  border-left: 0;
  border-right:
    1px solid var(--line);
}

.workflow-copy {
  padding:
    46px 45px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workflow-copy > span {
  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .65rem;
  letter-spacing: .075em;
}

.workflow-copy h3 {
  max-width: 520px;

  margin-top: 19px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      2.5rem,
      3.8vw,
      4.2rem
    );

  line-height: .94;
  font-weight: 500;
}

.workflow-copy p {
  max-width: 560px;

  margin-top: 18px;

  color: var(--muted);

  line-height: 1.75;
}

.workflow-image,
.workflow-code {
  min-width: 0;

  border-left:
    1px solid var(--line);

  background:
    #0a0d0f;
}

.workflow-image {
  display: grid;
  place-items: center;

  padding: 32px;
}

.workflow-image img {
  width: 100%;
  height: 100%;
  max-height: 390px;

  object-fit: contain;

  background:
    #101317;
}

.workflow-code {
  display: flex;
  flex-direction: column;
}

.workflow-code pre {
  flex: 1;

  display: grid;
  place-items: center;

  padding: 40px;

  overflow: auto;
}

.workflow-code code {
  color: #d4d8dc;

  font-family:
    "DM Mono",
    monospace;

  font-size:
    clamp(
      1rem,
      1.4vw,
      1.25rem
    );

  line-height: 1.9;
}

/* =========================================================
   RESULT / ECOSYSTEM
========================================================= */

.result-grid {
  margin-top: 48px;

  display: grid;

  grid-template-columns:
    1.35fr .65fr .65fr;

  gap: 14px;
}

.result-main,
.result-card {
  min-height: 300px;

  padding: 30px;

  border:
    1px solid var(--line);

  background:
    rgba(255,255,255,.015);
}

.result-main {
  min-height: 350px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  background:
    linear-gradient(
      145deg,
      var(--accent-soft),
      rgba(255,255,255,.015)
    );

  border-color:
    var(--accent-line);
}

.result-label,
.result-card > span {
  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .63rem;
  letter-spacing: .075em;
}

.result-main strong {
  display: block;

  margin-top: 20px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      2.8rem,
      4vw,
      4.5rem
    );

  line-height: .92;
  font-weight: 500;
}

.result-card strong {
  display: block;

  margin-top: 46px;

  font-family:
    "Fraunces",
    serif;

  font-size: 2rem;
  font-weight: 500;
}

.result-main p,
.result-card p {
  margin-top: 17px;

  color: var(--muted);

  line-height: 1.7;
}

/* =========================================================
   INTEGRATION
========================================================= */

.integration-section {
  background:
    #0d1013;
}

.integration-grid {
  display: grid;

  grid-template-columns:
    1.1fr .9fr;

  gap: 65px;
  align-items: center;
}

.integration-image {
  min-width: 0;

  padding: 24px;

  border:
    1px solid var(--line);

  background:
    #101317;
}

.integration-image img {
  width: 100%;
  max-height: 600px;

  display: block;

  object-fit: contain;
}

.integration-copy h2 {
  margin-top: 12px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      3rem,
      4.5vw,
      5rem
    );

  line-height: .94;
  font-weight: 500;
}

.integration-copy p {
  margin-top: 20px;

  color: var(--muted);

  line-height: 1.8;
}

.text-link {
  display: inline-flex;

  margin-top: 28px;
  padding-bottom: 6px;

  border-bottom:
    1px solid var(--accent);

  color: var(--accent);

  font-family:
    "DM Mono",
    monospace;

  font-size: .73rem;
}

/* =========================================================
   STACK
========================================================= */

.stack-list {
  margin-top: 40px;

  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

/* =========================================================
   CTA
========================================================= */

.project-cta {
  padding:
    110px 0;
}

.cta-box {
  min-height: 470px;

  padding:
    60px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  border:
    1px solid var(--accent-line);

  background:
    linear-gradient(
      145deg,
      rgba(255,79,154,.1),
      rgba(255,255,255,.012)
    );
}

.cta-box h2 {
  max-width: 950px;

  margin-top: 15px;

  font-family:
    "Fraunces",
    serif;

  font-size:
    clamp(
      3.7rem,
      5.8vw,
      6.5rem
    );

  line-height: .9;
  font-weight: 500;
}

.cta-box p {
  max-width: 670px;

  margin-top: 22px;

  color: var(--muted);

  line-height: 1.8;
}

.center-actions {
  justify-content: center;
}

/* =========================================================
   FOOTER
========================================================= */

.project-footer {
  border-top:
    1px solid var(--line);
}

.footer-inner {
  min-height: 95px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  color: #606870;

  font-family:
    "DM Mono",
    monospace;

  font-size: .67rem;
  letter-spacing: .065em;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1180px) {

  .hero-grid,
  .split-section,
  .config-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .section-copy {
    justify-self: start;
  }

  .architecture-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .architecture-card {
    width: 100%;
    min-height: auto;
  }

  .architecture-arrow {
    min-height: 38px;

    transform:
      rotate(90deg);
  }

  .result-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .result-main {
    grid-column:
      1 / -1;
  }

}

@media(max-width:900px) {

  .nav-links {
    display: none;
  }

  .facts-grid {
    grid-template-columns:
      1fr 1fr;
  }

  .fact:nth-child(2) {
    border-right: 0;
  }

  .fact:nth-child(-n+2) {
    border-bottom:
      1px solid var(--line);
  }

  .design-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-main {
    grid-column: auto;
  }

  .workflow-row,
  .workflow-row.reverse {
    grid-template-columns: 1fr;
  }

  .workflow-row.reverse
  .workflow-copy,
  .workflow-row.reverse
  .workflow-image,
  .workflow-row.reverse
  .workflow-code {
    order: initial;
  }

  .workflow-image,
  .workflow-code,
  .workflow-row.reverse
  .workflow-image,
  .workflow-row.reverse
  .workflow-code {
    border-left: 0;
    border-right: 0;

    border-top:
      1px solid var(--line);
  }

}

@media(max-width:700px) {

  .container {
    width:
      calc(100% - 28px);
  }

  .hero {
    padding:
      60px 0 70px;
  }

  .hero h1 {
    font-size:
      clamp(
        4rem,
        18vw,
        6rem
      );
  }

  .hero h2 {
    font-size: 1.55rem;
  }

  .hero-visual img {
    min-height: 330px;
    padding: 14px;
  }

  .facts-grid {
    grid-template-columns: 1fr;
  }

  .fact {
    border-right: 0;
    border-bottom:
      1px solid var(--line);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .section {
    padding:
      78px 0;
  }

  .section-heading h2,
  .integration-copy h2 {
    font-size:
      clamp(
        2.8rem,
        13vw,
        4.4rem
      );
  }

  .design-card,
  .result-main,
  .result-card {
    padding: 24px 22px;
  }

  .config-table > div {
    grid-template-columns: 1fr;
    gap: 8px;

    padding:
      18px 0;
  }

  .workflow-copy {
    padding:
      34px 22px;
  }

  .workflow-image {
    padding: 18px;
  }

  .workflow-code pre {
    min-height: 260px;
    padding: 28px 20px;
  }

  .cta-box {
    min-height: 430px;
    padding:
      42px 22px;
  }

  .cta-box h2 {
    font-size:
      clamp(
        3rem,
        14vw,
        4.8rem
      );
  }

  .footer-inner {
    padding:
      28px 0;

    flex-direction: column;
    align-items: flex-start;
  }

}
