/* =========================================================
   Dom | One on One Coaching
   Palette: near-black canvas, graphite surfaces, white type,
            a dark crimson used sparingly.

   Forked from the FushiFit (Ty) build and rewritten for a darker,
   Berserk-leaning look: heavier blacks, an ink grain over the
   whole page, sharp corners, a serif display face, and red that
   shows up as a cut rather than a fill. The red is dark enough to
   carry white type, so accent fills take --text, not a dark ink.

   Every translucent accent goes through the -rgb tokens, so a
   retheme is the :root block and nothing else.
   ========================================================= */

:root{
  /* --- canvas --- */
  --bg:         #070708;
  --bg-alt:     #0c0c0e;
  --surface:    #111113;
  --surface-2:  #17171a;
  --line:       rgba(255,255,255,.08);
  --line-2:     rgba(255,255,255,.15);

  /* --- type --- */
  --text:       #ededec;
  --muted:      #9d9d9f;
  --muted-2:    #67676b;

  /* --- red --- */
  --accent-rgb:    170,26,36;
  --accent-hi-rgb: 214,44,56;

  --accent:        #aa1a24;  /* rules, icons, small display type */
  --accent-hi:     #d62c38;  /* hover, eyebrows (5.2:1 on bg) */
  --accent-btn:    #9c1620;  /* button fill, white on it is 7.4:1 */
  --accent-btn-hi: #b51b27;
  --accent-ink:    #ffffff;  /* type sitting ON an accent fill */
  --accent-deep:   #3a0a0e;
  --accent-dim:    rgba(var(--accent-rgb),.10);
  --accent-line:   rgba(var(--accent-rgb),.38);

  /* Shine stops for the roaming highlight on accent text. */
  --accent-mid:    #e2545e;
  --accent-peak:   #f3c9cc;

  /* Form errors. The accent IS red here, so errors get a brighter,
     more orange red than the brand one, plus the icon, so they still
     read as a problem and not as decoration. */
  --warn:          #ff6a5c;

  /* --- fonts --- */
  --display: "Cinzel", "Times New Roman", Georgia, serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --nav-h: 79px;
  --wrap: 1180px;
  --r:    3px;

  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.5);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
  scroll-padding-top:96px;
  -webkit-text-size-adjust:100%;
  background:var(--bg);
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.7;
  font-weight:350;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

/* Ink grain over everything. A fixed layer of monochrome noise at a few
   percent, multiplied so it only ever darkens. It is what stops the flat
   blacks reading as a screen and makes them read as paper and ink. Not
   animated: a moving grain repaints the whole viewport every frame. */
body::before{
  content:"";
  position:fixed; inset:0; z-index:998;
  pointer-events:none;
  opacity:.055;
  mix-blend-mode:screen;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:260px 260px;
}

img{ max-width:100%; height:auto; display:block; }

h1,h2,h3,h4{
  font-family:var(--display);
  font-weight:800;
  line-height:1.05;
  letter-spacing:.01em;
  margin:0;
  color:var(--text);
}

p{ margin:0 0 1.15em; }
p:last-child{ margin-bottom:0; }

a{ color:inherit; text-decoration:none; }

::selection{ background:var(--accent-btn); color:var(--accent-ink); }

.wrap{ width:100%; max-width:var(--wrap); margin:0 auto; padding:0 28px; }

.skip-link{
  position:absolute; left:-9999px; top:0; z-index:1200;
  background:var(--accent-btn); color:var(--accent-ink); padding:12px 20px; font-weight:600;
}
.skip-link:focus{ left:0; }

/* Separator glyph. A small slanted red cut, never a dash or a dot. */
.sep{
  display:inline-block;
  width:7px; height:1.5px;
  margin:0 .55em;
  vertical-align:middle;
  background:var(--accent);
  transform:rotate(-58deg);
  opacity:.9;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--sans);
  font-size:14px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:15px 28px;
  border-radius:var(--r);
  border:1px solid transparent;
  cursor:pointer;
  transition:background .25s var(--ease), border-color .25s var(--ease),
             transform .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  text-align:center;
  line-height:1.2;
}
.btn:focus-visible{ outline:2px solid var(--accent-hi); outline-offset:3px; }

.btn--primary{
  background:var(--accent-btn);
  color:var(--accent-ink);
  border-color:rgba(255,255,255,.08);
}
.btn--primary:hover{ background:var(--accent-btn-hi); transform:translateY(-1px); }

.btn--ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--line-2);
}
.btn--ghost:hover{ border-color:var(--accent); color:var(--text); }

.btn--lg{ padding:18px 34px; font-size:14.5px; }
.btn[disabled]{ opacity:.4; cursor:not-allowed; transform:none; }

.brand{
  font-family:var(--display);
  font-weight:900;
  font-size:19px;
  letter-spacing:.2em;
  text-transform:uppercase;
  display:inline-flex; align-items:baseline;
}
/* The mark after the name is a small red diamond, the same shape as the
   rail nodes, rather than a full stop. */
.brand em{
  display:inline-block;
  width:.34em; height:.34em;
  margin-left:.28em;
  background:var(--accent-hi);
  transform:rotate(45deg) translateY(-.08em);
  flex:none;
}
.brand--sm{ font-size:15px; }

.tmodal__x{
  flex:none;
  width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:1px solid var(--line-2); border-radius:var(--r);
  color:var(--muted); cursor:pointer;
  transition:color .2s var(--ease), border-color .2s var(--ease);
}
.tmodal__x:hover{ color:var(--text); border-color:var(--accent); }
.tmodal__x:focus-visible{ outline:2px solid var(--accent-hi); outline-offset:2px; }

/* =========================================================
   APPLICATION: popup on index.html, full page on apply.html
   ========================================================= */

.amodal{
  width:min(94vw, 760px);
  max-height:min(90vh, 900px);
  padding:0;
  border:1px solid var(--line-2);
  border-radius:var(--r);
  background:var(--bg);
  color:var(--text);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.amodal::backdrop{
  background:rgba(3,3,4,.84);
  -webkit-backdrop-filter:blur(6px);
          backdrop-filter:blur(6px);
}
.amodal[open]{ animation:amodalIn .35s var(--ease); }
@keyframes amodalIn{
  from{ opacity:0; transform:translateY(14px) scale(.985); }
  to{ opacity:1; transform:none; }
}
.amodal__inner{ display:flex; flex-direction:column; max-height:inherit; }
.amodal__bar{
  display:flex; align-items:center; gap:18px;
  padding:14px 14px 14px 24px;
  flex:none;
  background:var(--surface);
}
.amodal__bar .apply__count{ flex:1; text-align:right; }
.amodal__body{
  padding:clamp(28px,5vw,48px) clamp(22px,5vw,56px) clamp(32px,5vw,52px);
  overflow-y:auto;
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(var(--accent-rgb),.10), transparent 60%),
    var(--bg);
}
@media (max-width:560px){
  .amodal{ width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border:0; border-radius:0; }
  .amodal[open]{ animation:none; }
  .amodal__inner{ max-height:100dvh; height:100dvh; }
}

/* Standalone page (apply.html) */
.apply-page{
  min-height:100vh;
  display:flex; flex-direction:column;
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(var(--accent-rgb),.10), transparent 60%),
    var(--bg);
}
.apply__bar{
  position:sticky; top:0; z-index:20;
  background:rgba(7,7,8,.92);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.apply__bar-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; height:68px;
}
.apply__count{
  font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2); font-weight:600;
}
.apply__progress{
  height:2px; background:var(--line); position:relative; overflow:hidden; flex:none;
}
.apply__progress i{
  position:absolute; inset:0 auto 0 0;
  background:var(--accent-hi);
  width:0%;
  transition:width .45s var(--ease);
}
.apply__main{
  flex:1;
  display:flex; align-items:center;
  padding:clamp(40px,8vh,88px) 0;
}
.apply__shell{ width:100%; max-width:720px; margin:0 auto; padding:0 28px; }

.q{ display:none; }
.q.is-active{ display:block; animation:qin .45s var(--ease); }
@keyframes qin{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .q.is-active{ animation:none; } }

.q__index{
  font-family:var(--display);
  font-size:12px; font-weight:800; letter-spacing:.18em; text-transform:uppercase;
  color:var(--accent-hi); margin-bottom:18px; display:block;
}
.q__title{
  font-size:clamp(24px,3.4vw,36px);
  line-height:1.15;
  margin-bottom:14px;
  text-transform:none;
  letter-spacing:0;
}
.q__help{ color:var(--muted); font-size:16px; margin:0 0 30px; max-width:56ch; }

.field{
  width:100%;
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:var(--r);
  color:var(--text);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.6;
  padding:16px 18px;
  transition:border-color .2s var(--ease), background .2s var(--ease);
  -webkit-appearance:none;
  appearance:none;
}
.field::placeholder{ color:var(--muted-2); }
.field:focus{ outline:none; border-color:var(--accent-hi); background:var(--surface); }
textarea.field{ min-height:150px; resize:vertical; }

.group{ display:grid; gap:18px; }
.group__row{ display:block; }
.group__label{
  display:block;
  font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2);
  margin-bottom:9px;
}
.group__row:focus-within .group__label{ color:var(--accent-hi); }

.choices{ display:grid; gap:12px; }
.choice{
  display:flex; align-items:flex-start; gap:16px;
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:var(--r);
  padding:18px 20px;
  cursor:pointer;
  position:relative;
  transition:border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.choice:hover{ background:var(--surface); transform:translateY(-1px); }
.choice input{ position:absolute; opacity:0; pointer-events:none; }
.choice__dot{
  flex:none; width:18px; height:18px; margin:3px 2px 0 0;
  border:1.5px solid var(--line-2);
  position:relative;
  transform:rotate(45deg);
  transition:border-color .2s var(--ease);
}
.choice__dot::after{
  content:""; position:absolute; inset:4px;
  background:var(--accent-hi);
  transform:scale(0); transition:transform .2s var(--ease);
}
.choice__text b{
  display:block;
  font-family:var(--sans);
  font-size:16.5px; font-weight:600; letter-spacing:-.01em;
  margin-bottom:4px;
}
.choice__text small{ color:var(--muted); font-size:14px; line-height:1.5; display:block; }
.choice--check .choice__dot{ transform:none; }
.choice--check .choice__dot::after{
  inset:0;
  background:no-repeat center/11px 11px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.6 8.9 10 3.1' fill='none' stroke='%23d62c38' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.choice:has(input:checked){
  border-color:var(--accent);
  background:linear-gradient(180deg, rgba(var(--accent-rgb),.10), var(--surface));
}
.choice:has(input:checked) .choice__dot{ border-color:var(--accent-hi); }
.choice:has(input:checked) .choice__dot::after{ transform:scale(1); }
.choice:focus-within{ outline:2px solid var(--accent-hi); outline-offset:3px; }

.q__error{
  margin-top:14px;
  font-size:14px; color:var(--warn);
  display:none;
  padding-left:20px;
  position:relative;
}
.q__error::before{
  content:"!";
  position:absolute; left:0; top:2px;
  width:14px; height:14px;
  border:1.5px solid var(--warn);
  border-radius:50%;
  font-size:10px; font-weight:700; line-height:12px; text-align:center;
}
.q__error.is-on{ display:block; }

.q__nav{
  display:flex; align-items:center; gap:14px;
  margin-top:34px;
  padding-top:26px;
  border-top:1px solid var(--line);
}
.q__nav .spacer{ flex:1; }
.q__hint{ font-size:12px; color:var(--muted-2); letter-spacing:.04em; }
@media (max-width:560px){
  .q__hint{ display:none; }
  .q__nav{ flex-wrap:wrap; gap:12px; }
  .q__nav .spacer{ display:none; }
  .q__nav .btn{ flex:1 1 100%; order:-1; justify-content:center; }
  .q__nav .back-link{ flex:0 0 auto; }
}
.back-link{
  background:none; border:0; cursor:pointer;
  color:var(--muted-2); font-family:var(--sans); font-size:14px;
  padding:8px 4px;
  transition:color .2s var(--ease);
}
.back-link:hover{ color:var(--text); }

.done{ display:none; text-align:center; }
.done.is-active{ display:block; animation:qin .5s var(--ease); }
.done__mark{
  width:64px; height:64px; margin:0 auto 28px;
  border:1.5px solid var(--accent-hi);
  background:var(--accent-dim);
  color:var(--accent-hi);
  display:flex; align-items:center; justify-content:center;
  transform:rotate(45deg);
}
.done__mark svg{ transform:rotate(-45deg); }
.done__title{ font-size:clamp(28px,4vw,42px); text-transform:uppercase; margin-bottom:18px; }
.done__body{ color:var(--muted); font-size:17px; max-width:52ch; margin:0 auto; }
.done__actions{ margin-top:34px; display:flex; justify-content:center; flex-wrap:wrap; gap:14px; }
.done__fallback{
  margin:22px auto 0;
  max-width:52ch;
  padding:14px 18px;
  border:1px solid var(--line-2);
  background:var(--surface);
  color:var(--muted);
  font-size:14.5px;
  line-height:1.6;
}
.done__fallback a{ color:var(--accent-hi); text-decoration:underline; }
.done__panel{
  margin-top:44px;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--line);
  padding:28px 26px;
}
.done__panel h3{
  font-size:13px; letter-spacing:.16em; text-transform:uppercase;
  font-family:var(--sans); color:var(--muted-2); font-weight:600;
  margin-bottom:18px;
}
.done__panel ol{ margin:0; padding-left:20px; color:var(--muted); font-size:15px; display:grid; gap:10px; }

.handoff{
  display:none;
  margin-top:44px; text-align:left;
  background:var(--surface);
  border:1px dashed var(--accent-line);
  padding:26px;
}
.handoff.is-on{ display:block; }
.handoff__tag{
  font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--accent-hi); font-weight:700; margin-bottom:16px;
}
.handoff__score{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--display); font-weight:800;
  font-size:12px; letter-spacing:.12em; text-transform:uppercase;
  padding:7px 16px; margin-bottom:20px;
}
.handoff__score[data-tier="hot"]{ background:var(--accent-btn); color:var(--accent-ink); }
.handoff__score[data-tier="qualified"]{ background:var(--accent-dim); color:var(--accent-hi); border:1px solid var(--accent-line); }
.handoff__score[data-tier="nurture"]{ background:var(--surface-2); color:var(--muted); border:1px solid var(--line-2); }
.handoff__score[data-tier="declined"]{ background:var(--surface-2); color:var(--muted-2); border:1px solid var(--line); }
.handoff pre{
  margin:0; white-space:pre-wrap; word-break:break-word;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px; line-height:1.65; color:var(--muted);
  background:var(--bg); border:1px solid var(--line);
  padding:18px; max-height:340px; overflow:auto;
}
