/* ============================================================
   TC Concepts — static front page
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Lastica";
  src: url("../assets/fonts/Lastica.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noway";
  src: url("../assets/fonts/noway-regular.woff2") format("woff2"),
       url("../assets/fonts/noway-regular.woff") format("woff"),
       url("../assets/fonts/noway-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --red: #ec0000;            /* brand red: underlines, accent blocks, logo T */
  --accent-text: #c20000;    /* red for small text/links — AA (5.2:1) on white */
  --ink: #1c1c1c;            /* headings / strong foreground */
  --text: #333333;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --bg: #ffffff;
  --bg-muted: #f7f7f8;
  --header-bg: rgba(255,255,255,.9);
  --field-bg: #ffffff;
  --btn-bg: #000000;
  --btn-bg-hover: #333333;
  --btn-fg: #ffffff;
  --btn-border: #000000;
  --focus: #1066d8;          /* focus ring — distinct from brand, AA on bg */
  --footer-bg: #141414;      /* footer stays dark in both themes */
  --footer-text: #c9c9c9;
  --footer-muted: #9a9a9a;
  --footer-accent: #ff6a5e;  /* red that reads on the dark footer */
  --max: 1160px;
  --gap: clamp(1.25rem, 4vw, 3rem);
  --head: "Lastica", "Arial Narrow", sans-serif;
  --body: "Noway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #ff6a5e;  /* lighter red — AA on dark bg */
    --ink: #f2f2f2;
    --text: #d8d8d8;
    --muted: #a6a6a6;
    --line: #2b2c30;
    --bg: #0f0f11;
    --bg-muted: #17181b;
    --header-bg: rgba(15,15,17,.9);
    --field-bg: #1a1b1e;
    --btn-bg: #1b1b1e;
    --btn-bg-hover: #2b2b30;
    --btn-fg: #ffffff;        /* white button text in both themes */
    --btn-border: #55565d;    /* visible edge on the dark page */
    --focus: #7cb0ff;
  }
}
::selection { background: var(--red); color: #fff; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Accessibility: focus + skip link ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem;
  padding: .7em 1.1em;
  border-radius: 3px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--head);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  padding: .85em 1.7em;
  border-radius: 2px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--dark { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-border); }
.btn--dark:hover { background: var(--btn-bg-hover); border-color: var(--btn-border); }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-border); }
.btn--primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-border); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
}
/* The SVG logo adapts to light/dark on its own, so no backing plate is needed. */
.brand__logo { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav > a {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .82rem;
  color: var(--ink);
  transition: color .15s ease;
}
.nav > a:hover { color: var(--accent-text); }
.nav__cta, .nav__cta:hover { color: var(--btn-fg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(460px, 82vh, 780px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8,10,14,.88) 0%, rgba(8,10,14,.62) 34%, rgba(8,10,14,.38) 58%, rgba(8,10,14,.12) 85%, rgba(8,10,14,0) 100%),
    linear-gradient(180deg, rgba(8,10,14,.12), rgba(8,10,14,.30));
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(2rem, 6vw, 3.5rem);
  padding-bottom: clamp(2rem, 6vw, 3.5rem);
}
.hero__title {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: .01em;
  line-height: 1.08;
  font-size: clamp(1.15rem, 3.35vw, 1.95rem);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
  margin: 0 0 1rem;
}
.hero__lead {
  max-width: 44ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,.88);
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
  margin: 0 0 1.75rem;
}
.hero__cta { margin-bottom: 0; }
@media (max-width: 640px) {
  .hero__bg { object-position: 62% center; }
  .hero::after {
    background: linear-gradient(180deg, rgba(8,10,14,.45) 0%, rgba(8,10,14,.68) 52%, rgba(8,10,14,.86) 100%);
  }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--muted { background: var(--bg-muted); }
.section__title {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: .03em;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-align: center;
  margin: 0 0 2.5rem;
  position: relative;
}
.section__title::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  background: var(--red);
  margin: .8rem auto 0;
}

/* ---------- About ---------- */
.about__body p { margin: 0 0 1.15rem; font-size: 1.06rem; }
.about__body { text-align: center; }

/* ---------- Services (zigzag) ---------- */
.zigzag { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 4.5rem); }
.zz {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.zz--reverse .zz__media { order: 2; }
.zz__media {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 44px -28px rgba(0,0,0,.5);
}
.zz__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.zz:hover .zz__media img { transform: scale(1.04); }
.zz__text h3 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: .02em;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  margin: 0 0 .75rem;
}
.zz__text p { margin: 0 0 1rem; color: var(--text); }
.zz__list { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--text); }
.zz__list li { margin-bottom: .3rem; }
.link-more {
  display: inline-block;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  color: var(--accent-text);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s ease;
}
.link-more::after { content: " →"; }
.link-more:hover { border-color: var(--accent-text); }

/* ---------- Contact ---------- */
.contact__lead { text-align: center; color: var(--muted); margin: 0 auto 2.25rem; max-width: 52ch; }
.contact-form {
  display: grid;
  gap: 1.1rem;
  max-width: 620px;
  margin-inline: auto;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .72rem;
  color: var(--muted);
}
.req { color: var(--accent-text); }
.field input, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  padding: .75rem .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(236,0,0,.12);
}
.contact-form .btn { justify-self: start; }
.form-note { margin: .25rem 0 0; font-size: .92rem; min-height: 1.2em; }
.form-note.ok { color: #1a7a33; }
.form-note.err { color: var(--accent-text); }
.contact__meta { text-align: center; color: var(--muted); margin-top: 2rem; font-size: .95rem; }
.contact__meta a { color: var(--accent-text); }

/* ---------- Footer (always dark, both themes) ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.footer__logo { height: 48px; width: auto; opacity: .95; margin-bottom: 1rem; }
.footer__brand p { margin: 0; color: var(--footer-muted); max-width: 34ch; }
.footer__col h4 {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
  color: #fff;
  margin: 0 0 1rem;
}
.footer__col a { display: block; color: #cfcfcf; padding: .28rem 0; transition: color .15s ease; }
.footer__col a:hover { color: var(--footer-accent); }
.footer__bar { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.1rem; font-size: .85rem; color: #8f8f8f; }

/* ---------- Legal pages ---------- */
.legal-hero {
  background: var(--bg-muted);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}
.legal-hero h1 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink);
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  margin: 0;
}
.legal-hero .crumb {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.legal-hero .crumb a { color: var(--accent-text); }

.legal { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem); }
.legal__body {
  max-width: 820px;
  margin-inline: auto;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.legal__body h1, .legal__body h2, .legal__body h3 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--ink);
  line-height: 1.25;
  margin: 2rem 0 .8rem;
}
.legal__body h1 { font-size: 1.5rem; }
.legal__body h2 { font-size: 1.25rem; }
.legal__body h3 { font-size: 1.08rem; }
.legal__body p { margin: 0 0 1rem; }
.legal__body a { color: var(--accent-text); overflow-wrap: break-word; }
.legal__body ul, .legal__body ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal__body li { margin-bottom: .35rem; }
.legal__body strong { color: var(--ink); }
.legal__body hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.legal__body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal__body th, .legal__body td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.legal__contact p { margin: .15rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem 20px 1.25rem;
    transform: translateY(-120%);
    transition: transform .3s ease;
    box-shadow: 0 20px 40px -24px rgba(0,0,0,.4);
  }
  .nav.open { transform: translateY(0); }
  .nav > a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
  .nav__cta { text-align: center; margin-top: 1rem; border-bottom: 0; }
  .nav-toggle { display: flex; }

  .zz { grid-template-columns: 1fr; gap: 1.25rem; }
  .zz--reverse .zz__media { order: 0; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  .form-note.ok { color: #4fcf72; }
  .hero__media, .zz__media { box-shadow: 0 18px 44px -26px rgba(0,0,0,.85); }
  .site-header { border-bottom-color: var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
