/* Sydney Triumph Lawyers — "Open Now" design system
   Shared tokens + interactive components. Section layout lives inline in each page
   (faithful to the approved design); refactor into components when building. */

:root {
  /* Colour */
  --night: #0A0C10;        /* main dark ground */
  --night-2: #0E1015;      /* cast panels */
  --screen: #050608;       /* charge player screen */
  --rule: #24272D;         /* hairlines on dark */
  --paper: #EDE7DC;        /* light sections */
  --ink: #0A0C10;          /* text on paper / amber */
  --text: #EDE7DC;         /* primary text on dark */
  --text-2: #C9C4BA;       /* secondary text on dark */
  --muted: #A8A39A;        /* body copy on dark */
  --dim: #8F8B84;          /* captions / mono labels on dark (5.8:1) */
  --paper-text: #3B3934;   /* body copy on paper */
  --paper-muted: #6B665E;  /* de-emphasised words on paper */
  --paper-caption: #5E5A53;
  --amber: #F2A93B;        /* "streetlight" accent — use sparingly */

  /* Type */
  --serif: 'Libre Caslon Display', Georgia, serif;          /* the human voice */
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;   /* the system voice */
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1360px;
  --gutter: clamp(20px, 3vw, 40px);
  --section-pad: clamp(96px, 10vw, 160px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Film grain overlay (decorative) */
.grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.09; }

/* Live dot */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242,169,59,.55); } 70% { box-shadow: 0 0 0 10px rgba(242,169,59,0); } 100% { box-shadow: 0 0 0 0 rgba(242,169,59,0); } }
@keyframes pulseInk { 0% { box-shadow: 0 0 0 0 rgba(10,12,16,.45); } 70% { box-shadow: 0 0 0 10px rgba(10,12,16,0); } 100% { box-shadow: 0 0 0 0 rgba(10,12,16,0); } }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 2s infinite; }
.live-ink { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); animation: pulseInk 2s infinite; }

/* Links & buttons */
.navlink:hover { color: #FFFFFF !important; }
.btn-amber { display: inline-flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 30px; background: var(--amber); color: var(--ink); font-size: 17px; font-weight: 600; }
.btn-amber:hover { filter: brightness(1.07); }
.ulink { text-decoration: underline; text-underline-offset: 5px; }
.ulink:hover { text-decoration-color: currentColor !important; }

/* Header + mobile menu */
.site-header { position: relative; max-width: var(--container); margin: 0 auto; padding: 20px var(--gutter); display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: center; justify-content: space-between; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 34px; font-size: 15px; }
.site-nav a { min-height: 44px; display: flex; align-items: center; color: var(--text-2); }
.site-nav a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -1px 0 var(--amber); }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--text); cursor: pointer; }

/* Highlighter (paper sections) */
.highlight { padding: 0 0.04em; background: linear-gradient(transparent 57%, var(--amber) 57%, var(--amber) 89%, transparent 89%); }

/* Strike-through device: "you are not your charge" */
.strike, .strike-load {
  background-image: linear-gradient(var(--amber), var(--amber));
  background-repeat: no-repeat; background-position: 0 62%; background-size: 100% .075em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@keyframes strike { 0%, 28% { background-size: 0% .075em; } 72%, 100% { background-size: 100% .075em; } }
@keyframes strikeLoad { from { background-size: 0% .07em; } to { background-size: 100% .07em; } }
.strike { animation: strike 1.6s cubic-bezier(.65,0,.25,1) both; }
.strike-load { background-size: 100% .07em; animation: strikeLoad 1.8s .6s cubic-bezier(.65,0,.25,1) both; }

/* Charge player (homepage) */
@keyframes reveal { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.reveal { animation: reveal .8s cubic-bezier(.2,.7,.2,1) both; }
.prog { animation: prog 3.6s linear both; }
.idx { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 12px; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); transition: background .3s ease, color .3s ease; }
.idx .idx-n { flex: none; width: 22px; color: var(--dim); }
.idx:hover, .idx.is-active { color: var(--text); }
.idx.is-active { background: #15181E; }
.idx.is-active .idx-n { color: var(--amber); }
.idx-group { padding: 18px 12px 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.civil:hover .civil-name { color: var(--amber); }

/* Cast panels (homepage) */
@keyframes castIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cast-row { display: flex; gap: 2px; height: 620px; }
.cast { position: relative; overflow: hidden; flex: 1 1 0; min-width: 0; transition: flex-grow .8s cubic-bezier(.65,0,.25,1); background: var(--night-2); color: var(--text); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: clamp(24px, 2.4vw, 36px); }
.cast.is-open { flex-grow: 2.4; }
.cast-light { position: absolute; inset: 0; background: radial-gradient(90% 70% at 100% 0%, rgba(242,169,59,.22) 0%, rgba(242,169,59,0) 60%); opacity: .3; transition: opacity .8s ease; }
.cast.is-open .cast-light { opacity: 1; }
.cast-initial { position: absolute; right: -.06em; bottom: -.2em; font-family: var(--serif); font-size: 560px; line-height: .8; color: #15181E; pointer-events: none; }
.cast-role { position: relative; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color .4s ease; }
.cast.is-open .cast-role { color: var(--amber); }
.cast-v { position: relative; align-self: flex-start; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -.01em; color: var(--text-2); animation: castIn .6s both; }
.cast-open { position: relative; display: none; flex-direction: column; gap: 16px; }
.cast.is-open .cast-v { display: none; }
.cast.is-open .cast-open { display: flex; animation: castIn .8s .25s cubic-bezier(.2,.7,.2,1) both; }

/* FAQ (practice page) — native <details name="faq"> exclusive accordion */
.faq { border-top: 1px solid #C9C1B2; }
.faq summary { list-style: none; min-height: 88px; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 24px; text-align: center; font-family: var(--mono); font-size: 22px; }
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover .faq-label { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.faq p { margin: 0; padding: 0 48px 32px 0; max-width: 640px; font-size: 17px; line-height: 1.7; color: var(--paper-text); animation: castIn .5s cubic-bezier(.2,.7,.2,1) both; }

/* Mobile call bar */
.callbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--night); border-top: 1px solid var(--rule); }
.callbar a { height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; }
.callbar .call { flex: 2 1 0; background: var(--amber); color: var(--ink); }
.callbar .eval { flex: 1 1 0; border: 1px solid #4A4D54; color: var(--text); font-weight: 500; }

@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-phone { display: none !important; } /* the phone lives in the fixed call bar on mobile */
  .menu-btn { display: flex; }
  .site-header.nav-open .site-nav { display: flex; flex-direction: column; width: 100%; padding: 8px 0 16px; border-top: 1px solid var(--rule); }
  .callbar { display: flex; }
  body { padding-bottom: 88px; }
  .cast-row { flex-direction: column; height: auto; }
  .cast { min-height: 240px; flex: 1 1 auto !important; }
  .cast .cast-v { display: none; }
  .cast .cast-open { display: flex; }
  .cast-initial { font-size: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live, .live-ink, .strike, .strike-load, .reveal, .prog, .cast-v, .cast.is-open .cast-open, .faq p { animation: none; }
  .cast, .cast-light, .idx { transition: none; }
}
