:root {
  --ground:      #F1F3F6;
  --surface:     #FFFFFF;
  --surface-2:   #E7EAEF;
  --ink:         #14171C;
  --ink-2:       #3B434F;
  --muted:       #6B7482;
  --line:        #D2D8E0;
  --line-soft:   #E2E6EC;
  --amber:       #C2740E;
  --amber-bright:#E08A1E;
  --amber-wash:  rgba(224,138,30,0.10);
  --steel:       #47617D;
  --shadow:      0 1px 2px rgba(20,23,28,0.06), 0 8px 24px rgba(20,23,28,0.06);
  --shadow-lift: 0 2px 4px rgba(20,23,28,0.08), 0 18px 44px rgba(20,23,28,0.12);

  --display: "Bricolage Grotesque", "Noto Sans SC", "Noto Sans Devanagari", "Noto Sans Arabic", system-ui, sans-serif;
  --body:    "Public Sans", "Noto Sans SC", "Noto Sans Devanagari", "Noto Sans Arabic", system-ui, sans-serif;
  --mono:    "Sometype Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --measure: 64ch;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #0E1116;
    --surface:     #161A22;
    --surface-2:   #1E242E;
    --ink:         #EDF0F4;
    --ink-2:       #C3CAD4;
    --muted:       #8B94A2;
    --line:        #2A313C;
    --line-soft:   #222933;
    --amber:       #E8A249;
    --amber-bright:#F2B15C;
    --amber-wash:  rgba(232,162,73,0.12);
    --steel:       #8FAEC9;
    --shadow:      0 1px 2px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lift: 0 2px 4px rgba(0,0,0,0.5), 0 18px 44px rgba(0,0,0,0.55);
  }
}
:root[data-theme="dark"] {
  --ground:      #0E1116;
  --surface:     #161A22;
  --surface-2:   #1E242E;
  --ink:         #EDF0F4;
  --ink-2:       #C3CAD4;
  --muted:       #8B94A2;
  --line:        #2A313C;
  --line-soft:   #222933;
  --amber:       #E8A249;
  --amber-bright:#F2B15C;
  --amber-wash:  rgba(232,162,73,0.12);
  --steel:       #8FAEC9;
  --shadow:      0 1px 2px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lift: 0 2px 4px rgba(0,0,0,0.5), 0 18px 44px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); width: 100%; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.022em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.14rem; font-weight: 700; letter-spacing: -0.012em; line-height: 1.3; }
p  { margin: 0; max-width: var(--measure); }
a  { color: inherit; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.735rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow--amber { color: var(--amber); }

:focus-visible { outline: 2px solid var(--amber-bright); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0.5rem; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 0.6rem 1rem;
  border: 1px solid var(--line); border-radius: 7px; text-decoration: none; font-size: 0.9rem;
}
.skip:focus { inset-inline-start: 1rem; }

/* ---------- masthead ---------- */
header.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0.8rem var(--pad);
  display: flex; align-items: center; gap: 1rem 1.75rem; flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em;
  text-decoration: none; margin-inline-end: auto;
}
.reclamp {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber-bright);
  animation: pulse 2.6s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224,138,30,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(224,138,30,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,138,30,0); }
}

nav.sitenav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
nav.sitenav a {
  font-size: 0.9rem; font-weight: 500; text-decoration: none; color: var(--ink-2);
  padding: 0.35rem 0.6rem; border-radius: 6px;
  transition: color 0.14s, background 0.14s;
}
nav.sitenav a:hover { color: var(--ink); background: var(--surface-2); }
nav.sitenav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--amber-bright); border-radius: 6px 6px 0 0; }

.langbar { display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.langbar button {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: none; border: 1px solid transparent; color: var(--muted);
  padding: 0.3rem 0.45rem; border-radius: 5px; cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}
.langbar button:hover { color: var(--ink); background: var(--surface-2); }
.langbar button[aria-pressed="true"] { color: var(--ink); border-color: var(--line); background: var(--surface); }

/* ---------- page furniture ---------- */
.page-head { padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.75rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.page-head p { color: var(--ink-2); font-size: clamp(1.02rem, 1.4vw, 1.14rem); }

section { padding-block: clamp(2.75rem, 5.5vw, 4.75rem); border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: none; }
.sec-head { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.sec-head p { color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--body); font-size: 0.95rem; font-weight: 600;
  padding: 0.78rem 1.35rem; border-radius: 7px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { box-shadow: var(--shadow-lift); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.25rem, 4.5vw, 4rem) clamp(2.5rem, 4.5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 950px) { .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(2rem, 4vw, 3.5rem); } }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; }
.hero h1 .quiet { color: var(--muted); display: block; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.24rem); color: var(--ink-2); max-width: 46ch; }

.rig {
  display: flex; flex-direction: column; gap: 0.85rem;
  perspective: 1150px;
  perspective-origin: 50% 42%;
}
.rig-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.rig-count { font-family: var(--mono); font-size: 0.735rem; color: var(--muted); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; margin: 0; }
.rig-count b { color: var(--amber); font-weight: 600; }

.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -9deg));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 0.55rem; } }

.tile {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  background: linear-gradient(168deg, var(--surface-2), var(--surface) 62%);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 0.65rem 0.6rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transform: translateZ(var(--z, 0px));
  transition: border-color 0.35s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, opacity 0.5s ease;
}
/* the live variant lifts out of the stack toward the viewer */
.tile.is-live {
  border-color: var(--amber-bright);
  transform: translateZ(calc(var(--z, 0px) + 62px));
  box-shadow: var(--shadow-lift);
}
/* deal the stack in from the back on load */
.tile.dealing { opacity: 0; transform: translateZ(-160px); }
.tile-id { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.tile.is-live .tile-id { color: var(--amber); }
.tile-hook {
  margin-top: auto;
  font-family: var(--display); font-weight: 700; font-size: clamp(0.68rem, 1.1vw, 0.84rem);
  line-height: 1.18; letter-spacing: -0.012em; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.tile.is-live .tile-hook { color: var(--ink); }
.tile-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tile-bar i { display: block; height: 100%; width: 0%; background: var(--amber-bright); border-radius: 2px; }
.tile.is-live .tile-bar i { animation: fill 2.4s linear forwards; }
@keyframes fill { from { width: 0%; } to { width: 100%; } }

.rig-note { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); line-height: 1.5; letter-spacing: 0.02em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reclamp { animation: none; }
  .tiles { transform: none; transition: none; }
  .tile { transform: none; transition: border-color 0.2s ease; }
  .tile.is-live { transform: none; }
  .tile.dealing { opacity: 1; transform: none; }
  .tile.is-live .tile-bar i { animation: none; width: 100%; }
  .btn:hover, nav.sitenav a:hover { transform: none; }
  .pack { transform: none !important; transition: none; }
}

/* ---------- blocks ---------- */
.pitch { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .pitch { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; } }
.pitch-block { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 1.15rem; border-top: 2px solid var(--line); }
.pitch-block.accent { border-top-color: var(--amber-bright); }
.pitch-block p { color: var(--ink-2); font-size: 0.97rem; }

.packs { display: grid; grid-template-columns: 1fr; gap: 1rem; perspective: 1400px; }
@media (min-width: 860px) { .packs { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.pack {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.pack:hover, .pack:focus-within { box-shadow: var(--shadow-lift); }
.pack.featured { border-color: var(--amber-bright); box-shadow: var(--shadow-lift); }
.pack-top { display: flex; flex-direction: column; gap: 0.4rem; }
.pack-price { font-family: var(--display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pack-price span { font-family: var(--mono); font-size: 0.76rem; font-weight: 400; color: var(--muted); letter-spacing: 0.04em; }
.pack ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.pack li { display: flex; gap: 0.6rem; font-size: 0.93rem; color: var(--ink-2); line-height: 1.45; }
.pack li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.5rem; border-radius: 1px; background: var(--steel); }
.pack.featured li::before { background: var(--amber-bright); }
.pack-tag { align-self: flex-start; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.24rem 0.5rem; border-radius: 4px; background: var(--amber-wash); color: var(--amber); }

.spec-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
table.spec th, table.spec td { text-align: start; padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }
table.spec th { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; width: 34%; }
table.spec td { color: var(--ink-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .panel.split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; } }
.rules { display: flex; flex-direction: column; gap: 0.9rem; }
.rule { display: flex; gap: 0.85rem; align-items: baseline; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.rule:last-child { border-bottom: none; padding-bottom: 0; }
.rule-plat { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--steel); flex: none; width: 5.5rem; }
.rule-text { font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; flex: 1 1 14rem; }

.steps { display: grid; grid-template-columns: 1fr; gap: 1.6rem; counter-reset: step; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }
.step { display: flex; flex-direction: column; gap: 0.55rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.73rem; font-weight: 600; letter-spacing: 0.08em; color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.step p { font-size: 0.92rem; color: var(--ink-2); }

.work-state {
  border: 1px dashed var(--line); border-radius: 11px; background: var(--surface-2);
  padding: clamp(1.5rem, 3.5vw, 2.25rem); display: flex; flex-direction: column; gap: 0.75rem;
}
.work-state p { color: var(--ink-2); font-size: 0.97rem; }

.contact { display: flex; flex-direction: column; gap: 1.35rem; align-items: flex-start; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.mailto {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 3vw, 2rem); color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--amber-bright); padding-bottom: 0.12rem; word-break: break-word;
}
.mailto:hover { color: var(--amber); }

/* legal pages */
.legal { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 3rem; }
.legal-block { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.legal-block p, .legal-block li { color: var(--ink-2); font-size: 0.95rem; max-width: 68ch; }
.legal-block ul { margin: 0; padding-inline-start: 1.15rem; display: flex; flex-direction: column; gap: 0.35rem; }
.legal-block dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.3rem 1.5rem; }
@media (min-width: 620px) { .legal-block dl { grid-template-columns: 11rem 1fr; } }
.legal-block dt { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.legal-block dd { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.todo {
  display: inline-block; font-family: var(--mono); font-size: 0.76rem;
  background: var(--amber-wash); color: var(--amber); padding: 0.1rem 0.42rem; border-radius: 4px;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-soft); padding-block: 2.25rem 3rem; margin-top: auto; }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; margin: 0; }
.foot-links { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.foot-links a { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

[dir="rtl"] .tile-bar i { direction: ltr; }
[dir="rtl"] .step::before { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] nav.sitenav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber-bright); }

