/* Tecware — tecware.com.au
   Palette: grading-suite graphite surround, tally red for live/actions, scope cyan for detail. */

:root {
  --surround: #1d2025;      /* page background — neutral grading-room grey */
  --panel:    #262a31;      /* raised surfaces */
  --rule:     #3a3f48;      /* hairlines */
  --text:     #ecebe7;      /* primary text */
  --muted:    #a3a7ae;      /* secondary text */
  --tally:    #ff4b2b;      /* live / primary action */
  --scope:    #6fd3e8;      /* detail accent */

  --wide: 125;              /* Archivo width axis for display */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surround);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--scope); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  font-variation-settings: "wdth" var(--wide);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--text); color: var(--surround); padding: 8px 14px;
}
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .85em 1.4em;
  font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: 3px; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--tally); color: #fff; }
.btn-primary:hover { background: #e63c1d; }
.btn-ghost { border-color: rgba(236,235,231,.45); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(236,235,231,.06); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background-color .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(29,32,37,.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em;
  font-variation-settings: "wdth" var(--wide);
}
/* mark: a tiny 16:9 frame with a tally dot */
.brand-mark {
  width: 26px; height: 15px; border: 2px solid currentColor; border-radius: 2px;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tally); right: 2px; top: 2px;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav ul a:not(.nav-cta) { color: var(--muted); transition: color .2s; }
.nav ul a:not(.nav-cta):hover { color: var(--text); }
.nav-cta { padding: .55em 1em; border: 1px solid var(--tally); border-radius: 3px; color: var(--text); }
.nav-cta:hover { background: var(--tally); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); color: var(--text);
  font: inherit; font-size: .9rem; padding: .45em .9em; border-radius: 3px; cursor: pointer;
}

/* ---------- hero viewport ---------- */
.hero { padding: 84px var(--gutter) 0; }
.viewport {
  position: relative; overflow: hidden;
  min-height: min(86vh, 880px);
  border-radius: 4px;
  background: #000;
  display: flex; align-items: flex-end;
  isolation: isolate;
}
.hero-video, .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero-fallback { display: none; }
.viewport.no-video .hero-video { display: none; }
.viewport.no-video .hero-fallback { display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(10,12,15,.92) 0%, rgba(10,12,15,.55) 38%, rgba(10,12,15,.15) 70%, rgba(10,12,15,.35) 100%);
}

/* broadcast safe-area guides */
.safe { position: absolute; pointer-events: none; }
.action-safe { inset: 3.5%; }
.action-safe i {
  position: absolute; width: 22px; height: 22px; border-color: rgba(236,235,231,.55); border-style: solid; border-width: 0;
}
.action-safe i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.action-safe i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.action-safe i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.action-safe i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.title-safe { inset: 10%; border: 1px dashed rgba(236,235,231,.12); }
.title-safe::before, .title-safe::after { /* centre cross */
  content: ""; position: absolute; left: 50%; top: 50%; background: rgba(236,235,231,.22);
}
.title-safe::before { width: 18px; height: 1px; transform: translate(-50%, -50%); }
.title-safe::after { width: 1px; height: 18px; transform: translate(-50%, -50%); }

.burnin {
  position: absolute; z-index: 2;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: rgba(236,235,231,.85);
  display: flex; align-items: center; gap: 8px;
}
.burnin-tl { top: calc(3.5% + 30px); left: calc(3.5% + 30px); }
.burnin-tr { top: calc(3.5% + 30px); right: calc(3.5% + 30px); color: rgba(236,235,231,.6); }
.burnin-br {
  bottom: calc(3.5% + 26px); right: calc(3.5% + 30px);
  background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 2px;
}
.tc { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: .06em; }
.fps { color: var(--scope); }
.tally {
  width: 9px; height: 9px; border-radius: 50%; background: var(--tally);
  box-shadow: 0 0 0 4px rgba(255,75,43,.22);
  animation: tally 2s ease-in-out infinite;
}
@keyframes tally { 50% { opacity: .35; } }

.hero-copy {
  position: relative; z-index: 2;
  padding: 0 calc(10% + 4px) calc(10% + 4px);
  max-width: 1100px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 5.4rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -0.03em;
  max-width: 15ch;
  text-wrap: balance;
}
.lede {
  margin-top: 1.4rem; max-width: 56ch;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: rgba(236,235,231,.86);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* page-load sequence: the only orchestrated motion */
.js .hero-copy > * { opacity: 0; transform: translateY(14px); }
.js .loaded .hero-copy > * { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s ease; }
.js .loaded .hero-copy > :nth-child(2) { transition-delay: .15s; }
.js .loaded .hero-copy > :nth-child(3) { transition-delay: .3s; }
.js .safe, .js .burnin { opacity: 0; transition: opacity 1.2s ease .5s; }
.js .loaded .safe, .js .loaded .burnin { opacity: 1; }

/* ---------- shared section layout ---------- */
main > section:not(.hero) {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 11vw, 150px) var(--gutter) 0;
}
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head p { color: var(--muted); max-width: 46ch; margin: 0; }

/* ---------- statement ---------- */
.statement > p {
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  line-height: 1.32; font-weight: 400; max-width: 34ch;
  letter-spacing: -0.01em; text-wrap: pretty;
}

/* ---------- services ---------- */
.svc-group { border-top: 1px solid var(--rule); }
.svc-group + .svc-group { margin-top: clamp(48px, 6vw, 80px); }
.svc-group-h {
  font-size: 1rem; font-weight: 600; font-variation-settings: "wdth" 100;
  letter-spacing: 0; color: var(--scope);
  padding: 18px 0 4px;
}
.svc {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 64px;
  padding: 28px 0; border-bottom: 1px solid var(--rule);
}
.svc:last-child { border-bottom: 0; }
.svc h4 { font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.12; max-width: 18ch; }
.svc p { color: var(--muted); max-width: var(--measure); margin: 0; }
.svc .tools { margin-top: 14px; color: var(--text); font-size: .92rem; opacity: .8; }

/* ---------- AI band ---------- */
main > section.ai { max-width: none; padding-left: 0; padding-right: 0; }
.ai-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter);
  background: var(--panel);
  border-top: 2px solid var(--scope);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
@media (min-width: 1321px) { .ai-inner { border-radius: 4px; } }
.ai h2 { max-width: 15ch; margin-bottom: 1.5rem; }
.ai-copy > p { color: var(--muted); max-width: 58ch; font-size: 1.1rem; }
.ai-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.ai-list li { padding: 16px 0 16px 22px; border-top: 1px solid var(--rule); color: var(--muted); position: relative; max-width: 64ch; }
.ai-list li::before {
  content: ""; position: absolute; left: 0; top: 25px; width: 8px; height: 8px; background: var(--scope);
}
.ai-list strong { color: var(--text); font-weight: 600; }
.ai-media { margin: 0; }
.ai-media .media { aspect-ratio: 4 / 5; }

/* ---------- image placeholders ---------- */
.media {
  position: relative; overflow: hidden; border-radius: 3px;
  background: var(--panel);
  aspect-ratio: 16 / 10;
}
.media.ph {
  /* faint SMPTE-style bars */
  background:
    linear-gradient(to bottom, transparent 66%, rgba(29,32,37,.9) 66%),
    linear-gradient(to right,
      #3b3b3b 0 14.28%, #3a3a26 14.28% 28.57%, #263a3a 28.57% 42.85%, #263a26 42.85% 57.14%,
      #3a263a 57.14% 71.42%, #3a2626 71.42% 85.71%, #26263a 85.71% 100%);
}
.media.ph::after {
  content: attr(data-label) "\A" attr(data-file) "  ·  " attr(data-size);
  white-space: pre; position: absolute; left: 16px; bottom: 14px; right: 16px;
  font-size: .82rem; line-height: 1.5; color: var(--muted);
}
.media.loaded { background-size: cover; background-position: center; }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 4vw, 48px) clamp(16px, 2.4vw, 32px); }
.case { grid-column: span 5; }
.case-wide { grid-column: span 7; }
.case .media { margin-bottom: 18px; }
.case-wide .media { aspect-ratio: 16 / 10; }
.case:not(.case-wide) .media { aspect-ratio: 1 / 1; }
.case h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); margin-bottom: .5rem; max-width: 26ch; }
.case p { color: var(--muted); max-width: 52ch; margin: 0; }
/* offset rhythm: wide / narrow, narrow / wide */
.work-grid .case:nth-child(3) { grid-column: span 5; }
.work-grid .case:nth-child(4) { grid-column: span 7; }

/* ---------- approach ---------- */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--rule);
}
.steps li {
  counter-increment: step; padding: 28px 28px 0 0; position: relative;
}
.steps li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.steps li::before {
  content: counter(step); display: block;
  font-size: 2.6rem; font-weight: 300; line-height: 1; color: var(--tally);
  font-variation-settings: "wdth" var(--wide);
  margin-bottom: 22px;
}
.steps h3 { margin-bottom: .6rem; }
.steps p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.about-media { margin: 0; }
.about-media .media { aspect-ratio: 4 / 5; }
.about h2 { margin-bottom: 1.5rem; }
.about-copy p { color: var(--muted); max-width: 54ch; font-size: 1.1rem; }

/* ---------- contact ---------- */
main > section.contact {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px);
  padding-bottom: clamp(80px, 10vw, 140px);
}
.contact h2 { margin-bottom: 1.5rem; max-width: 12ch; }
.contact-copy > p { color: var(--muted); max-width: 40ch; }
.contact-direct { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-direct li { padding: 12px 0; border-top: 1px solid var(--rule); font-size: 1.1rem; }
.contact-direct a { text-decoration: none; }
.contact-direct a:hover { color: var(--scope); }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-self: start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .92rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 3px;
  padding: 12px 14px; width: 100%;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--scope); }
.field [aria-invalid="true"] { border-color: var(--tally); }
.hp { position: absolute; left: -9999px; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { margin: 0; color: var(--muted); }
.form-status.ok { color: var(--scope); }
.form-status.err { color: var(--tally); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem;
}
.footer p { margin: 0; }
.footer p:last-child { margin-left: auto; }
.brand-small .brand-word { font-size: 1rem; color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .section-head, .svc, .ai-inner, .about, main > section.contact { grid-template-columns: 1fr; }
  .svc { gap: 10px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li { padding-bottom: 28px; }
  .case, .case-wide, .work-grid .case:nth-child(n) { grid-column: 1 / -1; }
  .case .media, .case-wide .media { aspect-ratio: 16 / 10 !important; }
  .about-media { max-width: 420px; }
  .ai-media { max-width: 480px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav ul {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surround); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav ul.open { display: flex; }
  .nav ul li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav ul li:last-child a { border: 1px solid var(--tally); text-align: center; margin-top: 16px; }
  .hero { padding: 72px 10px 0; }
  .viewport { min-height: 88vh; }
  .hero-copy { padding: 0 24px 64px; }
  .title-safe { display: none; }
  .burnin-tr { display: none; }
  .burnin-tl { top: 40px; left: 42px; }
  .hero h1 { font-size: 2.25rem; }
  .burnin-br { bottom: 22px; right: 22px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .contact-form { grid-template-columns: 1fr; }
  .footer p:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tally { animation: none; }
  .js .hero-copy > *, .js .safe, .js .burnin { opacity: 1 !important; transform: none !important; transition: none !important; }
}
