/* =====================================================================
   OPDRIK — shared stylesheet
   Design thesis: "instrument panel". Petrol anchor (#053645), gold used
   only as a fine precision indicator, mono type for figures/IDs.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --petrol:      #053645;   /* logo field — anchor */
  --petrol-800:  #0a4a5c;
  --petrol-700:  #0e5a6f;
  --petrol-600:  #14708a;
  --gold:        #fbcf28;   /* accent — use sparingly */
  --gold-wash:   #fdf7db;   /* pastel-yellow tint */

  /* Neutrals / text */
  --ink:    #0c2a32;        /* headings on light */
  --slate:  #46585d;        /* body */
  --muted:  #7c8a8e;        /* captions */
  --line:   #dbe4e5;        /* hairlines on light */
  --line-2: #e9eff0;

  /* Surfaces */
  --surface: #ffffff;
  --mist:    #eef3f3;       /* light cool section tint */
  --mist-2:  #f6f9f9;

  /* On-dark */
  --on-dark:       #eef6f7;
  --on-dark-muted: #9db8bd;
  --line-dark:     rgba(255,255,255,0.12);

  /* Type */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Rhythm */
  --wrap: 1180px;
  --gap: clamp(1.5rem, 4vw, 4rem);
  --radius: 14px;
  --radius-sm: 9px;

  --shadow-sm: 0 1px 2px rgba(5,54,69,.06), 0 4px 14px rgba(5,54,69,.05);
  --shadow-md: 0 6px 20px rgba(5,54,69,.09), 0 20px 50px rgba(5,54,69,.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--slate);
  background: var(--surface);
  line-height: 1.62;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.08; font-weight: 600; letter-spacing: -0.015em; }
strong { color: var(--ink); font-weight: 600; }

::selection { background: var(--petrol); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.4rem, 900px); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--tint { background: var(--mist); }
.section--wash { background: var(--gold-wash); }
.section--dark { background: var(--petrol); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

/* Eyebrow with the aperture dot echoing the logo mark */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--petrol-600); font-weight: 500;
  margin-bottom: 1.1rem;
}
.section--dark .eyebrow { color: var(--gold); }
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px rgba(251,207,40,.22);
  flex: none;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 2.6rem; } }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { margin-top: 1rem; color: var(--slate); font-size: 1.06rem; }
.section--dark .section-head p { color: var(--on-dark-muted); }

.lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: var(--slate); }
.section--dark .lead { color: var(--on-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 500; font-size: .96rem;
  padding: .78rem 1.35rem; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  letter-spacing: -0.01em;
}
.btn .arw { transition: transform .18s ease; }
.btn:hover .arw { transform: translateX(3px); }
.btn--primary { background: var(--petrol); color: #fff; }
.btn--primary:hover { background: var(--petrol-800); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--petrol); color: var(--petrol); }
.section--dark .btn--ghost { color: #fff; border-color: var(--line-dark); }
.section--dark .btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--gold { background: var(--gold); color: var(--petrol); }
.btn--gold:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn--onDark { background: #fff; color: var(--petrol); }
.btn--onDark:hover { transform: translateY(-1px); background: var(--gold-wash); }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.25); }
.hero .btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--petrol);
  border-bottom: 1px solid var(--line-dark);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .62rem; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__word {
  font-family: var(--display); font-weight: 600; color: #fff;
  font-size: 1.24rem; letter-spacing: .02em;
}
.brand__word span { /* the "OP" — subtle gold, kept small */ color: var(--gold); }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-size: .93rem; color: var(--on-dark); font-weight: 450;
  padding: .5rem .82rem; border-radius: 100px;
  transition: background .16s ease, color .16s ease;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.is-active { color: #fff; }
.nav a.is-active::after {
  content: ""; display:block; height: 2px; width: 18px; margin: 3px auto 0;
  background: var(--gold); border-radius: 2px;
}
.nav__cta { margin-left: .5rem; }
.nav__cta .btn { padding: .55rem 1.05rem; font-size: .9rem; min-width: 14rem; justify-content: center; white-space: nowrap; color: #000; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-dark);
  border-radius: 9px; width: 42px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: #fff;
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: rotate(-45deg) translateY(-1px); }

/* ---------- Hero (shared shell) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--petrol);
  color: var(--on-dark);
  padding-block: clamp(3.4rem, 8vw, 6rem);
}
.hero::after { /* faint petrol gradient depth */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(20,112,138,.5), transparent 55%),
    radial-gradient(90% 70% at -5% 110%, rgba(10,74,92,.7), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  color: #fff; font-size: clamp(2.15rem, 5.4vw, 3.9rem);
  letter-spacing: -0.025em; max-width: 15ch;
}
.hero p { color: var(--on-dark-muted); font-size: clamp(1.05rem, 1.9vw, 1.28rem); max-width: 46ch; margin-top: 1.3rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--gap); align-items: center; }
.hero__media { display: flex; justify-content: center; }
.hero__media .aperture { width: min(330px, 74vw); height: auto; }
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero__media { justify-content: flex-start; }
  .hero__media .aperture { width: min(240px, 60vw); }
}

/* Aperture motif — the logo mark rendered as a scanning dial */
.aperture { position: relative; }
.aperture .ring { transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .aperture .spin { animation: aperture-spin 22s linear infinite; transform-origin: center; }
  .aperture .pulse { animation: aperture-pulse 3.6s ease-in-out infinite; transform-origin: center; }
}
@keyframes aperture-spin { to { transform: rotate(360deg); } }
@keyframes aperture-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--pad { padding: clamp(1.5rem, 2.4vw, 2.1rem); }
.card__num { font-family: var(--mono); font-size: .78rem; color: var(--slate); letter-spacing: .12em; }
.card h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.card p { color: var(--slate); font-size: .97rem; }

/* Pillar routing cards (home) */
.pillar {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.9rem 1.7rem 1.6rem;
  min-height: 100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c8d6d8; }
.pillar__index { font-family: var(--mono); font-size: .74rem; color: var(--petrol-600); letter-spacing: .16em; }
.pillar__title { font-size: 1.42rem; margin: .9rem 0 .1rem; }
.pillar__kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.pillar__body { color: var(--slate); font-size: .98rem; margin-top: .9rem; flex: 1; }
.pillar__link {
  margin-top: 1.3rem; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--display); font-weight: 500; color: var(--petrol); font-size: .95rem;
}
.pillar__link .arw { transition: transform .18s ease; }
.pillar:hover .pillar__link .arw { transform: translateX(4px); }
.pillar__rule { height: 3px; width: 34px; border-radius: 3px; background: var(--gold); margin-top: .2rem; }
.pillar__tag {
  position: absolute; top: 1.4rem; right: 1.4rem;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--petrol-600); border: 1px solid var(--line); border-radius: 100px; padding: .22rem .6rem;
}
.pillar__tag--soon { color: var(--petrol); background: var(--gold-wash); border-color: #efe0a6; }

/* ---------- Feature list ---------- */
.feature { border-top: 1px solid var(--line); padding-top: 1.3rem; }
.feature h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.feature p { font-size: .95rem; }
.section--dark .feature { border-color: var(--line-dark); }

/* ---------- Metric / readout ---------- */
.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.section--dark .readouts { background: var(--line-dark); border-color: var(--line-dark); }
.readout { background: var(--surface); padding: 1.5rem 1.4rem; }
.section--dark .readout { background: rgba(255,255,255,.02); }
.readout__val { font-family: var(--mono); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.section--dark .readout__val { color: #fff; }
.readout__val .u { color: var(--petrol-600); font-size: .55em; }
.section--dark .readout__val .u { color: var(--gold); }
.readout__label { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
.section--dark .readout__label { color: var(--on-dark-muted); }

/* ---------- Steps (real sequences only) ---------- */
.steps { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); }
.step {
  position: relative; padding: 1.5rem 1.35rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.step__no { font-family: var(--mono); font-size: .78rem; color: var(--petrol-600); letter-spacing: .1em; }
.step__no b { color: var(--ink); }
.step h3 { font-size: 1.05rem; margin: .7rem 0 .4rem; letter-spacing: 0; color: var(--ink); }
.step p { font-size: .92rem; color: var(--slate); }
.step::before { content: ""; position: absolute; left: 0; top: 1.5rem; width: 3px; height: 22px; background: var(--gold); border-radius: 3px; }
.step { padding-left: 1.6rem; }

/* ---------- Catalog table ---------- */
.catalog { display: grid; gap: 1rem; }
.cat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; background: var(--surface);
  display: grid; grid-template-columns: 1fr auto; gap: .4rem 1.5rem; align-items: start;
}
.cat h3 { font-size: 1.08rem; }
.cat p { font-size: .95rem; margin-top: .35rem; grid-column: 1 / -1; }
.cat__hsn { font-family: var(--mono); font-size: .74rem; color: var(--petrol-600); letter-spacing: .08em; white-space: nowrap; align-self: center; }

/* ---------- Brand chips (text only — compliance) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .04em;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 100px; padding: .4rem .9rem;
}

/* ---------- Status / list rows ---------- */
.rows { display: grid; gap: .1rem; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line);
}
.row__k { color: var(--ink); font-weight: 500; }
.row__v { font-family: var(--mono); font-size: .86rem; color: var(--slate); text-align: right; }
.section--dark .row { border-color: var(--line-dark); }
.section--dark .row__k { color: #fff; }
.section--dark .row__v { color: var(--on-dark-muted); }

/* ---------- Callout / disclosure ---------- */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--mist-2); border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem; font-size: .95rem; color: var(--slate);
}
.note strong { color: var(--ink); }

/* Checklist */
.checks { display: grid; gap: .7rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; }
.check svg { flex: none; margin-top: .28rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band p { color: var(--on-dark-muted); margin-top: 1rem; max-width: 44ch; margin-inline: auto; }
.cta-band .hero__actions { justify-content: center; }

/* ---------- Contact blocks ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4rem; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; background: var(--surface); }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.contact-line { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--line-2); }
.contact-line:first-of-type { border-top: 0; }
.contact-line .lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); width: 92px; flex: none; padding-top: .18rem; }
.contact-line .val { color: var(--ink); font-weight: 450; }
.contact-line a.val:hover { color: var(--petrol-600); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--petrol); color: var(--on-dark-muted); padding-block: 3.2rem 2rem; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; max-width: 30ch; color: var(--on-dark-muted); }
.footer-col h4 { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; font-size: .92rem; color: var(--on-dark-muted); padding: .28rem 0; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between;
  font-size: .82rem; font-family: var(--mono); color: var(--on-dark-muted); letter-spacing: .02em;
}
.footer-bottom .cin { letter-spacing: .06em; }

/* ---------- Terminal mockup (Media concept preview) ---------- */
.terminal {
  width: min(440px, 92vw);
  background: #041e26;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
  overflow: hidden;
  font-family: var(--mono);
}
.terminal__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem; background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: .68rem; letter-spacing: .14em; color: var(--on-dark-muted);
}
.terminal__dots { display: flex; gap: .35rem; }
.terminal__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); display: block; }
.terminal__dots i:first-child { background: var(--gold); }
.terminal__live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; color: var(--gold); }
.terminal__live::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--gold); box-shadow:0 0 0 3px rgba(251,207,40,.2); }
.terminal__body { padding: .5rem .85rem 1rem; }
.trow { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: baseline; padding: .5rem .1rem; border-bottom: 1px dashed rgba(255,255,255,0.07); font-size: .82rem; }
.trow .sym { color: #cfe4e7; letter-spacing: .04em; }
.trow .px { color: #eef6f7; }
.trow .dl { font-size: .74rem; text-align: right; }
.up { color: #4fd0a0; } .dn { color: #ef8f83; }
.terminal__spark { margin: .8rem .1rem .4rem; }
.terminal__cmd { display:flex; align-items:center; gap:.5rem; margin-top:.7rem; padding-top:.7rem; border-top:1px solid rgba(255,255,255,0.1); font-size:.8rem; color: var(--on-dark-muted); }
.terminal__cmd b { color: var(--gold); }
.terminal__caret { width:7px; height:15px; background: var(--gold); display:inline-block; }
@media (prefers-reduced-motion: no-preference) { .terminal__caret { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

/* Coming-soon utilities */
.soon-badge {
  display:inline-flex; align-items:center; gap:.5rem;
  font-family: var(--mono); font-size:.72rem; letter-spacing:.16em; text-transform:uppercase;
  color: var(--gold); border:1px solid rgba(251,207,40,.4); border-radius:100px; padding:.35rem .85rem;
}
.soon-badge::before { content:""; width:7px; height:7px; border-radius:50%; background: var(--gold); }

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  [data-reveal].in { opacity: 1; transform: none; }
}

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.site-header :focus-visible { outline-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--petrol); border-bottom: 1px solid var(--line-dark);
    padding: 1rem 1.2rem 1.4rem; gap: .2rem;
    transform: translateY(-120%); transition: transform .28s ease; z-index: 90;
  }
  body.nav-open .nav { transform: none; }
  .nav a { padding: .8rem 1rem; font-size: 1rem; border-radius: 10px; }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { background: rgba(255,255,255,.08); }
  .nav__cta { margin: .5rem 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; padding: .8rem; }
  .nav-toggle { display: inline-flex; }
  .grid--3, .grid--4, .grid--2, .readouts, .steps { grid-template-columns: 1fr; }
  .readouts { border-radius: var(--radius); }
  .footer-grid { grid-template-columns: 1fr; }
  .cat { grid-template-columns: 1fr; }
  .cat__hsn { justify-self: start; }
}
