/* Trinovata homepage. One accent (gold), type and space do the work.
   Motion: transform and opacity only, one curve, nothing routine over 300ms
   except the entrance reveal. See DESIGN.md. */

:root {
  --bg: #0A0A0C;
  --bg-raise: #121216;
  --line: rgba(228, 225, 218, 0.10);
  --text: #E4E1DA;
  --text-dim: #9C978D;
  --gold: #B5A688;
  --gold-hi: #C9B99A;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
em { font-style: normal; color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--text); color: var(--bg); padding: 8px 12px; }

/* â”€â”€ Header â”€â”€ */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad);
}
.brand img { height: 26px; width: auto; }
.top-nav { display: flex; gap: clamp(20px, 3vw, 36px); white-space: nowrap; }
@media (max-width: 520px) { .top-nav a[href="#contact"] { display: none; } }
.link-quiet { font-size: 15px; text-decoration: none; color: var(--text-dim); transition: color 160ms var(--ease); padding: 12px 0; }
.link-quiet:hover { color: var(--text); }

/* â”€â”€ Shared â”€â”€ */
.label {
  font: 400 13px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: clamp(40px, 6vw, 72px);
}
.lede { color: var(--text-dim); font-size: clamp(17px, 1.4vw, 19px); max-width: 46ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font: 500 15px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease), background-color 160ms var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.97); }
.link {
  display: inline-block; color: var(--gold-hi); text-decoration: none; font-size: 15px;
  padding: 10px 0; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 1px no-repeat;
}
.link:hover { color: var(--text); }

/* â”€â”€ Hero â”€â”€ */
.hero {
  max-width: var(--max); margin: 0 auto;
  min-height: 100svh; padding: 120px var(--pad) 64px;
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: clamp(32px, 5vw, 80px);
}
.kicker { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.hero h1 { font-size: clamp(48px, 7.2vw, 104px); line-height: 0.98; margin-bottom: 28px; }
.hero .lede { margin-bottom: 40px; }

/* â”€â”€ Devices (pure CSS frames, concentric radii) â”€â”€ */
.stage, .project-devices { position: relative; }
.laptop { --r: 14px; --b: 10px; width: 100%; }
.laptop-screen {
  border-radius: var(--r); padding: var(--b);
  background: #1A1A1F; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  aspect-ratio: 16 / 10.4;
}
.laptop-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(var(--r) - var(--b)); }
.laptop-base {
  height: 12px; margin: 0 -7%; border-radius: 0 0 14px 14px;
  background: linear-gradient(#2A2A30, #18181C);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.phone {
  --r: 34px; --b: 7px;
  position: absolute; right: -4%; bottom: -10%; width: 27%; min-width: 108px;
  border-radius: var(--r); padding: var(--b);
  background: #1A1A1F; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 30px 60px -20px rgba(0,0,0,0.8);
}
.phone-screen { position: relative; border-radius: calc(var(--r) - var(--b)); overflow: hidden; aspect-ratio: 390 / 844; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.island {
  position: absolute; z-index: 1; top: 3%; left: 50%; width: 30%; height: 3.2%;
  transform: translateX(-50%); border-radius: 999px; background: #000;
}
/* One warm light behind the devices, drawn once, never animated. */
.stage::before {
  content: ""; position: absolute; inset: 10% 5% -5% 10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(181,166,136,0.16), transparent);
  filter: blur(20px);
}

/* â”€â”€ Work â”€â”€ */
.work, .how { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 160px) var(--pad) 0; }
.project {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: clamp(32px, 6vw, 96px);
  padding-bottom: clamp(96px, 12vw, 160px);
}
.project:nth-of-type(even) .project-devices { order: 2; }
.project-devices { padding: 0 6% 8% 0; }
.project h3 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 16px; }
.project-text p { color: var(--text-dim); max-width: 40ch; margin-bottom: 20px; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(228,225,218,0.28); }
.btn-ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--gold); }
.all-work { margin-bottom: 8px; }
.status { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold) !important; }

/* â”€â”€ How â”€â”€ */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 80px 1fr; gap: 24px;
  padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--line);
}
.steps li > div { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 24px; align-items: baseline; }
.n { font: 300 15px/1.9 var(--display); color: var(--gold); }
.steps h3 { font-size: clamp(24px, 2.6vw, 34px); }
.steps p { color: var(--text-dim); max-width: 48ch; }

/* â”€â”€ Contact â”€â”€ */
.contact {
  max-width: var(--max); margin: 0 auto; padding: clamp(120px, 14vw, 200px) var(--pad);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: start;
}
.contact h2 { font-size: clamp(40px, 5vw, 68px); line-height: 1.04; margin-bottom: 24px; max-width: 11ch; text-wrap: balance; }
.contact .lede { margin-bottom: 16px; }
.form { display: grid; gap: 28px; }
.field { display: grid; gap: 10px; font-size: 14px; color: var(--text-dim); }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid rgba(228,225,218,0.22); border-radius: 0;
  padding: 10px 0 12px; font: 300 18px/1.5 var(--body); resize: vertical;
  transition: border-color 160ms var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field [aria-invalid="true"] { border-bottom-color: #C98A7A; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { min-height: 1.6em; font-size: 15px; color: var(--text-dim); }
.form-status.ok { color: var(--gold-hi); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* â”€â”€ Footer â”€â”€ */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 48px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--text-dim);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot a { text-decoration: none; padding: 8px 0; }
.foot a:hover { color: var(--text); }

/* â”€â”€ Reveal: slow in, slow out, staggered by JS â”€â”€ */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--d, 0ms);
}

/* â”€â”€ Small screens â”€â”€ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 128px; padding-bottom: 96px; }
  .stage { margin-right: 8%; }
  .project, .contact { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project-devices { order: 0; }
  .steps li { grid-template-columns: 48px 1fr; gap: 12px; }
  .steps li > div { grid-template-columns: 1fr; gap: 8px; }
  .form .btn { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .btn:active { transform: none; }
}
