/* Techpartner — interactive studio site
   Dark premium theme · Titillium Web throughout, self-hosted latin subset.
   All motion gated on prefers-reduced-motion (see .reduce overrides at the end). */

/* Titillium Web is a static family, not variable: one file per weight, and it
   ships no 500 — see the --wt-mid note below. The page resolves to exactly three
   faces: 400 body, 600 headings, 600 italic for the .hero-title accent. There is
   deliberately no 700 — .foot-brand strong is pinned to 600, so nothing asks for
   it. Adding a bold anywhere means adding the file too. */
@font-face {
  font-family: "Titillium Web";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/titillium-400.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Titillium Web";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/titillium-600.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Titillium Web";
  font-style: italic; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/titillium-600-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg:      #0A0B0D;
  --ink:     #F0EFEA;
  --body:    #C7C6BF;
  --muted:   #8C8B83;
  --line:    rgba(255,255,255,.10);
  --line-2:  rgba(255,255,255,.06);
  /* Drawn from the logo. Its blues (#0050A0, #0070C8) are too dark to use as
     text on --bg, so --accent is a lifted tint of the same hue. */
  --accent:  #5AA9FF;
  --accent-2:#FF7A29;
  --accent-hi:#93C6FF;
  --accent-ink: #04121F;

  /* One family for headings and body. --display / --sans are kept as separate
     names so the two roles stay easy to split again. */
  --display: "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans:    var(--display);

  /* Titillium ships no 500. CSS font-matching resolves a 500 request down to
     400, silently flattening the medium-weight text, so use 600 instead. */
  --wt-mid: 600;

  --maxw: 1120px;
  --pad:  clamp(20px, 5vw, 44px);
  --mx: 50vw; --my: 30vh;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 40; font-weight: 600; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Custom cursor ---------- */
.cursor-ring, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none; border-radius: 50%; mix-blend-mode: difference; will-change: transform; opacity: 0; }
.cursor-ring { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid #fff; transition: width .25s ease, height .25s ease, margin .25s ease, background .25s ease; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor-ring.grow { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(255,255,255,.12); }
.has-cursor .cursor-ring, .has-cursor .cursor-dot { opacity: 1; }

/* ---------- Living background ---------- */
.fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-canvas { position: absolute; inset: 0; opacity: .9; }
.fx-aurora {
  position: absolute; inset: -30%;
  background:
    radial-gradient(38% 40% at 22% 18%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 60%),
    radial-gradient(36% 42% at 82% 26%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 62%),
    radial-gradient(50% 45% at 60% 96%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
  filter: blur(34px) saturate(120%); opacity: .5;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift { 0% { transform: translate3d(-3%,-2%,0) scale(1); } 50% { transform: translate3d(4%,3%,0) scale(1.08); } 100% { transform: translate3d(-2%,4%,0) scale(1.03); } }
.fx-spot { position: absolute; inset: 0; background: radial-gradient(320px 320px at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 45; }
.progress span { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Brand mark ---------- */
.brand-mark { display: block; width: auto; height: 36px; }
.brand-mark.small { height: 28px; }

/* ---------- Hero brand lockup ---------- */
.hero-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; margin-bottom: clamp(30px, 6vw, 52px); will-change: transform; }
.brand-name { letter-spacing: -.01em; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-child] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--i,0) * 90ms); }
.is-in [data-reveal-child] { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(64px, 13vw, 132px); padding-bottom: clamp(30px, 6vw, 56px); }
.eyebrow { margin: 0 0 22px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
/* max-width holds lines 1-2 whole and wraps line 3, as the Fraunces original did.
   In Titillium 1ch = .56em and its longest whole line measures 18.8ch, so 20ch
   still clears it. Re-measure this if the heading font changes again: ch is the
   width of "0", so the cap silently retunes itself with the family. */
.hero-title { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 6.6vw, 72px); line-height: 1.06; letter-spacing: -.02em; margin: 0; color: var(--ink); max-width: 20ch; }
.hero-title em {
  font-style: italic; color: transparent;
  /* Stays in the cool family: --accent-2 is complementary, so a blue→orange
     sweep greys out through the middle of a headline this large. */
  background: linear-gradient(100deg, var(--accent), var(--accent-hi), var(--accent));
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 220% center; } }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .05em; }
.hero-title .line > span { display: block; transform: translateY(110%); transition: transform .95s cubic-bezier(.16,1,.3,1); }
.hero-title .line:nth-child(2) > span { transition-delay: .09s; }
.hero-title .line:nth-child(3) > span { transition-delay: .18s; }
.hero-title.is-in .line > span { transform: none; }
.lede { font-size: clamp(17px, 2.3vw, 21px); color: var(--body); max-width: 54ch; margin: 26px 0 0; }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 28px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .02em; }
.hero-tags .sep { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .7; }
.scroll-cue { display: block; width: 26px; height: 42px; margin-top: 46px; border: 1.5px solid var(--line); border-radius: 20px; position: relative; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 3px; background: var(--accent); animation: cue 1.7s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } }

/* ---------- Brand marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line-2); padding: 20px 0; margin: clamp(24px, 5vw, 48px) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 40px; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--display); font-size: clamp(20px, 3vw, 32px); font-weight: var(--wt-mid); color: var(--muted); letter-spacing: -.01em; white-space: nowrap; transition: color .3s; }
.marquee-track span:hover { color: var(--ink); }
.marquee-track i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; opacity: .8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Thesis ---------- */
.thesis { padding: clamp(24px, 5vw, 48px) var(--pad) clamp(50px, 9vw, 96px); }
.thesis p { max-width: 62ch; margin: 0 0 20px; color: var(--body); }
.thesis .pull { font-family: var(--display); font-size: clamp(20px, 3vw, 27px); line-height: 1.35; color: var(--ink); margin: 30px 0 0; max-width: 24ch; letter-spacing: -.01em; }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: 36px; }
.section-h { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 4vw, 38px); letter-spacing: -.015em; margin: 0; color: var(--ink); }
.section-sub { color: var(--muted); margin: 10px 0 0; }

/* ---------- Properties ---------- */
.properties { padding-block: clamp(20px, 4vw, 40px) clamp(56px, 10vw, 110px); }
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; border-radius: 20px; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx,0)) rotateY(var(--ry,0));
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease;
  will-change: transform;
}
.card:hover { box-shadow: 0 34px 66px -32px rgba(0,0,0,.75); }
/* rotating gradient border on hover */
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.4px; z-index: 2;
  background: conic-gradient(from var(--angle), transparent 8%, var(--accent), var(--accent-2), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
}
.card:hover::before { opacity: 1; animation: spin 4s linear infinite; }
@keyframes spin { to { --angle: 360deg; } }
.card-glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease; z-index: 1; background: radial-gradient(240px 240px at var(--gx,50%) var(--gy,50%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); }
.card:hover .card-glow { opacity: 1; }
.card-inner { position: relative; z-index: 3; padding: 24px; display: flex; gap: 18px; align-items: flex-start; transform: translateZ(45px); }

.card-logo { flex: none; }
.card-logo img { width: 54px; height: 54px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 8px; transition: transform .3s ease; }
.card-logo img.is-full { padding: 0; border: none; }
.card:hover .card-logo img { transform: scale(1.06) rotate(-2deg); }
.card-body { min-width: 0; }
.card h3 { margin: 3px 0 8px; font-size: 18px; letter-spacing: -.01em; color: var(--ink); font-family: var(--sans); font-weight: 600; }
.card h3 a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.card h3 a:hover { color: var(--accent); }
.arrow { transition: transform .25s ease; display: inline-block; color: var(--accent); }
.card:hover .arrow { transform: translate(4px,-1px); }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ---------- Model ---------- */
.model { padding-block: clamp(20px, 4vw, 40px) clamp(56px, 10vw, 110px); }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.steps li { display: flex; gap: 20px; align-items: baseline; padding: 20px 4px; border-bottom: 1px solid var(--line-2); font-size: clamp(18px, 2.4vw, 23px); color: var(--ink); font-family: var(--display); font-weight: var(--wt-mid); letter-spacing: -.01em; transition: padding-left .3s ease, color .3s ease; }
.steps li:hover { padding-left: 14px; color: #fff; }
.steps li span { flex: none; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .1em; width: 28px; }
.model-note { margin: 26px 0 0; color: var(--muted); font-size: 17px; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line-2); padding-block: 38px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand p { margin: 0; color: var(--muted); font-size: 15px; }
.foot-brand strong { color: var(--body); font-weight: 600; }
.foot-meta { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.foot-meta a { color: var(--muted); text-decoration: none; }
.foot-meta a:hover { color: var(--ink); }
.foot-meta span { color: var(--muted); }

@media (max-width: 480px) { .card-inner { padding: 20px; gap: 15px; } }

/* ---------- Reduced motion ---------- */
.reduce *, .reduce *::before, .reduce *::after { animation: none !important; transition: none !important; }
.reduce [data-reveal], .reduce [data-reveal-child] { opacity: 1 !important; transform: none !important; }
.reduce .hero-title .line > span { transform: none !important; }
.reduce .fx-aurora { opacity: .4; }
.reduce .fx-canvas { display: none; }
.reduce .card { transform: none !important; }
.reduce .marquee-track { animation: none !important; transform: none; }
.reduce .cursor-ring, .reduce .cursor-dot { display: none; }
