/* ============================================================
   TECTON — Spaces for a slower world
   Architecture studio template · system fonts only
   ============================================================ */

:root {
  --paper: #F4F3EE;
  --paper-deep: #EAE8E0;
  --ink: #171512;
  --ink-soft: #57534A;
  --line: rgba(23, 21, 18, 0.14);
  --cobalt: #2B3FE0;
  --cobalt-deep: #1D2BA8;
  --hero-bg: #0D0C0A;
  --hero-ink: #F2EFE7;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Custom easings — never bare ease-in */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swift: cubic-bezier(0.2, 0.85, 0.25, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 72px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }

h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; }

a { color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible, .site-footer :focus-visible { outline-color: #8FA0FF; }

::selection { background: var(--cobalt); color: #fff; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 6px; text-decoration: none; font-size: 0.9rem;
  transition: top 0.22s var(--ease-swift);
}
.skip-link:focus-visible { top: 12px; }

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { padding: clamp(72px, 10vw, 140px) 0; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-sub { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* ============ Reveal on scroll (transform + opacity only) ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Header ============ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--hero-ink);
  transition: background-color 0.28s var(--ease-swift), color 0.28s var(--ease-swift),
              box-shadow 0.28s var(--ease-swift);
}
.site-header.scrolled {
  background: rgba(244, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: var(--header-h);
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 14px; height: 14px; background: currentColor;
  clip-path: polygon(0 100%, 0 35%, 50% 0, 100% 35%, 100% 100%, 62% 100%, 62% 55%, 38% 55%, 38% 100%);
}
.brand-name { font-weight: 800; letter-spacing: 0.14em; font-size: 1.05rem; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.site-nav a {
  text-decoration: none; font-size: 0.95rem; font-weight: 550;
  opacity: 0.85; transition: opacity 0.2s var(--ease-swift);
}
.site-nav a:hover { opacity: 1; }
.nav-cta {
  border: 1px solid currentColor; border-radius: 999px;
  padding: 8px 18px !important; opacity: 1 !important;
  transition: background-color 0.22s var(--ease-swift), color 0.22s var(--ease-swift) !important;
}
.nav-cta:hover { background: var(--cobalt); border-color: var(--cobalt); color: #fff !important; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 6px; padding: 10px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: currentColor; transition: transform 0.25s var(--ease-swift), opacity 0.2s var(--ease-swift); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px var(--gutter) 20px;
  background: rgba(13, 12, 10, 0.97);
  color: var(--hero-ink);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { text-decoration: none; padding: 10px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-nav .nav-cta { border: 1px solid currentColor; border-radius: 999px; text-align: center; margin-top: 12px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--hero-bg);
  color: var(--hero-ink);
  display: flex; align-items: center;
  overflow: clip;
  isolation: isolate;
}
/* Blender-rendered hero plate with slow drift + scroll parallax (JS) */
.hero-media {
  position: absolute; inset: -7% 0; z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: 62% 42%;
  animation: hero-drift 28s var(--ease-inout) infinite alternate;
}
@keyframes hero-drift {
  from { transform: scale(1.03); }
  to { transform: scale(1.13); }
}
/* legibility grade over the render */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,12,10,0.62) 0%, rgba(13,12,10,0.18) 38%, rgba(13,12,10,0.60) 100%),
    linear-gradient(90deg, rgba(13,12,10,0.74) 0%, rgba(13,12,10,0.28) 58%, rgba(13,12,10,0.06) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
  padding: calc(var(--header-h) + 40px) 0 120px;
  pointer-events: none;
}
.hero-content a, .hero-content button { pointer-events: auto; }

.hero-kicker {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: #9AA3FF; margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(4.5rem, 17vw, 13rem);
  font-weight: 800; letter-spacing: 0.01em; line-height: 0.9;
  margin: 0 0 0.35em -0.04em;
}
.hero-tagline {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 500; letter-spacing: -0.01em; margin-bottom: 1rem;
}
.hero-lede { max-width: 34rem; color: rgba(242, 239, 231, 0.72); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.22s var(--ease-swift), color 0.22s var(--ease-swift),
              border-color 0.22s var(--ease-swift), transform 0.22s var(--ease-swift);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); }
.btn-ghost { border-color: rgba(242, 239, 231, 0.35); color: var(--hero-ink); }
.btn-ghost:hover { border-color: var(--hero-ink); }
.btn-full { width: 100%; }

.hero-annotations { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.annot {
  position: absolute; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; color: rgba(242, 239, 231, 0.5);
  text-transform: uppercase;
}
.annot-tl { top: calc(var(--header-h) + 18px); left: var(--gutter); }
.annot-tr { top: calc(var(--header-h) + 18px); right: var(--gutter); }
.annot-bl { bottom: 26px; left: var(--gutter); }
.annot-br { bottom: 26px; right: var(--gutter); display: flex; align-items: center; gap: 10px; }
.scroll-line { display: inline-block; width: 1px; height: 34px; background: rgba(242,239,231,0.5); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ""; position: absolute; inset: 0; background: #9AA3FF;
  animation: scroll-drop 1.8s var(--ease-inout) infinite;
}
@keyframes scroll-drop {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

/* ============ Clay model banner (Blender axonometric) ============ */
.model-banner { position: relative; overflow: clip; background: #E4E2DA; }
.model-banner-media { margin: -48px 0; will-change: transform; }
.model-banner-media img { width: 100%; height: auto; }
.model-banner-caption { position: relative; padding: 30px 0 44px; }
.model-banner-caption p {
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.02em;
  color: var(--ink-soft); margin: 0; max-width: 70ch;
}

/* ============ Work ============ */
.work { background: var(--paper); }
.project-grid {
  display: grid; gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(2, 1fr);
}
.project-card { text-decoration: none; display: block; }
.project-visual {
  position: relative; overflow: hidden; border-radius: 4px;
  background: var(--paper-deep);
  aspect-ratio: 4 / 3;
}
.project-visual svg { width: 100%; height: 100%; transition: transform 0.5s var(--ease-out); }
.project-card:hover .project-visual svg, .project-card:focus-visible .project-visual svg { transform: scale(1.03); }
.project-index {
  position: absolute; top: 14px; left: 16px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.85); text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.project-body { padding: 18px 4px 0; }
.project-body h3 { font-size: 1.45rem; margin-bottom: 10px; }
.project-specs { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; justify-content: start; }
.spec { display: flex; flex-direction: column; }
.spec-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.spec-value { font-size: 0.95rem; font-weight: 600; }
.project-desc { color: var(--ink-soft); font-size: 0.98rem; margin: 12px 0 0; max-width: 46ch; }

/* ============ Studio ============ */
.studio { background: var(--paper-deep); }
.studio-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 6vw, 90px); align-items: center;
}
.studio-copy p { font-size: 1.06rem; color: #33302A; }
.studio-copy p strong { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat-num { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 750; letter-spacing: -0.02em; color: var(--cobalt-deep); }
.stat-label { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.45; display: block; margin-top: 4px; }
.studio-figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: clamp(16px, 3vw, 32px); }
.studio-figure figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 14px; font-style: italic; }

/* ============ Services ============ */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service-list li {
  display: grid; grid-template-columns: 90px 1fr; gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.5vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.service-num { font-family: var(--mono); font-size: 0.9rem; color: var(--cobalt); letter-spacing: 0.08em; }
.service-list h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 8px; }
.service-list p { color: var(--ink-soft); max-width: 62ch; margin: 0; }

/* ============ Process ============ */
.process { background: var(--ink); color: var(--hero-ink); }
.process .section-sub { color: rgba(242, 239, 231, 0.65); }
.process-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.process-grid li {
  border-top: 1px solid rgba(242, 239, 231, 0.25);
  padding-top: 22px; display: flex; flex-direction: column; gap: 10px;
}
.phase-num { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.2em; color: #9AA3FF; }
.process-grid h3 { font-size: 1.4rem; margin: 0; }
.process-grid p { color: rgba(242, 239, 231, 0.7); font-size: 0.96rem; margin: 0; flex: 1; }
.phase-meta { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; color: rgba(242,239,231,0.45); text-transform: uppercase; }

/* ============ Testimonials ============ */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.quote-grid blockquote {
  margin: 0; padding: 30px 28px;
  background: var(--paper-deep); border-radius: 4px;
  border-left: 3px solid var(--cobalt);
  display: flex; flex-direction: column; gap: 18px;
}
.quote-grid blockquote p { font-size: 1.04rem; line-height: 1.65; margin: 0; flex: 1; }
.quote-grid footer { display: flex; flex-direction: column; gap: 2px; }
.quote-grid cite { font-style: normal; font-weight: 700; font-size: 0.95rem; }
.quote-grid footer span { font-size: 0.85rem; color: var(--ink-soft); }

/* ============ Contact ============ */
.contact { background: var(--paper-deep); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.contact-copy p { color: var(--ink-soft); font-size: 1.08rem; max-width: 40ch; }
.contact-details { margin-top: 32px; display: flex; flex-direction: column; }
.contact-line {
  display: grid; grid-template-columns: 90px 1fr; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
  text-decoration: none; align-items: baseline;
}
.contact-line:last-child { border-bottom: 1px solid var(--line); }
a.contact-line .contact-value { transition: color 0.2s var(--ease-swift); }
a.contact-line:hover .contact-value { color: var(--cobalt); }
.contact-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.contact-value { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }

.contact-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(24px, 3.5vw, 40px);
  display: flex; flex-direction: column; gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea {
  font: inherit; font-size: 1rem;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink);
  transition: border-color 0.2s var(--ease-swift), box-shadow 0.2s var(--ease-swift);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(43, 63, 224, 0.15);
}
.form-error { color: #B3261E; font-size: 0.92rem; margin: 0; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; text-align: center; }

/* ============ Footer ============ */
.site-footer { background: var(--hero-bg); color: var(--hero-ink); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.footer-brand p { color: rgba(242,239,231,0.6); font-size: 0.95rem; margin-top: 12px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { text-decoration: none; color: rgba(242,239,231,0.75); font-size: 0.95rem; transition: color 0.2s var(--ease-swift); }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }
.footer-contact a { color: rgba(242,239,231,0.75); text-decoration: none; transition: color 0.2s var(--ease-swift); overflow-wrap: anywhere; }
.footer-contact a:hover { color: #fff; }
.footer-contact span { color: rgba(242,239,231,0.5); }
.footer-legal {
  border-top: 1px solid rgba(242,239,231,0.15); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem; color: rgba(242,239,231,0.45);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .project-grid { grid-template-columns: 1fr; }
  .studio-grid, .contact-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .service-list li { grid-template-columns: 1fr; gap: 6px; }
  .annot-tr, .annot-bl { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-media img { animation: none; transform: none; }
}
