/* =========================================================
   Kyrø — "Blueprint" / technical schematic theme
   ========================================================= */

:root {
  --paper:      #EEF2F6;
  --paper-warm: #F8FAFC;
  --ink:        #0F2A43;
  --ink-soft:   #3E5A73;
  --blue:       #1E6FE0;
  --cyan:       #2BB3C0;
  --hair:       rgba(15, 42, 67, .16);
  --hair-soft:  rgba(15, 42, 67, .09);
  --grid:       rgba(15, 42, 67, .055);

  --f-display: "Sora", system-ui, sans-serif;
  --f-body:    "DM Sans", system-ui, sans-serif;
  --f-mono:    "Space Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

/* ---------- Drafting paper backdrop ---------- */
.paper { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.grid-layer {
  position: absolute; inset: -2px;
  background-position: 0 0, 0 0, 0 0;
  animation: gridpan 60s linear infinite;
}
@keyframes gridpan { to { background-position: 28px 28px, 28px 28px, 28px 28px; } }

/* corner registration ticks */
.reg { position: fixed; width: 26px; height: 26px; opacity: .55; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { width: 100%; height: 1.5px; top: 50%; }
.reg::after { height: 100%; width: 1.5px; left: 50%; }
.reg--tl { top: 18px; left: 18px; }
.reg--tr { top: 18px; right: 18px; }
.reg--bl { bottom: 18px; left: 18px; }
.reg--br { bottom: 18px; right: 18px; }
@media (max-width: 720px) { .reg { display: none; } }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-200%);
  top: 8px; z-index: 100; background: var(--ink); color: #fff;
  padding: .6rem 1rem; font-family: var(--f-mono); font-size: .8rem;
  border-radius: 0; transition: transform .2s;
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(238, 242, 246, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--blue); transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: scale(1.08) rotate(-4deg); }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; }
.brand-tag { font-family: var(--f-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--ink-soft); border: 1px solid var(--hair); padding: .15rem .4rem; }

.nav-list { list-style: none; display: flex; align-items: center; gap: clamp(.4rem, 2vw, 1.6rem); }
.nav-list a {
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  display: inline-flex; align-items: baseline; gap: .35rem; padding: .4rem 0; transition: color .2s;
}
.nav-list a i { font-family: var(--f-mono); font-size: .62rem; font-style: normal; color: var(--blue); opacity: .8; }
.nav-list a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--ink); padding: .5rem .9rem !important; color: var(--ink) !important;
  transition: background .2s, color .2s !important;
}
.nav-cta:hover { background: var(--ink); color: #fff !important; }
.nav-cta:hover i { color: var(--cyan); }

.nav-toggle { display: none; background: none; border: 1px solid var(--hair); width: 44px; height: 40px;
  cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 20px; height: 1.6px; background: var(--ink); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-warm); border-bottom: 1px solid var(--hair);
    padding: .5rem clamp(1.1rem, 4vw, 2.5rem) 1.2rem;
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav-list.open { max-height: 360px; }
  .nav-list li { border-top: 1px solid var(--hair-soft); }
  .nav-list a { padding: .9rem 0; }
  .nav-cta { border: none; padding: .9rem 0 !important; }
  .nav-cta:hover { background: none; color: var(--blue) !important; }
}

/* =========================================================
   Eyebrows / shared annotation bits
   ========================================================= */
.eyebrow {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: .5rem;
}
.tick { width: 9px; height: 9px; position: relative; flex: none; }
.tick::before, .tick::after { content: ""; position: absolute; background: var(--blue); }
.tick::before { width: 100%; height: 1.4px; top: 50%; transform: translateY(-50%); }
.tick::after { height: 100%; width: 1.4px; left: 50%; transform: translateX(-50%); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(2rem, 5vw, 3rem); position: relative; }
.hero-grid { display: block; }

.hero-copy h1 {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -.025em;
  margin: 1rem 0 1.3rem;
}
.ink-accent { color: var(--blue); position: relative; }
.ink-accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.07em; height: 2px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, transparent 8px 13px);
}
.lede { font-size: clamp(1.02rem, 1.7vw, 1.18rem); max-width: 38ch; color: var(--ink-soft); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2rem; }
.btn {
  font-family: var(--f-display); font-weight: 600; font-size: .95rem; text-decoration: none;
  padding: .82rem 1.4rem; display: inline-flex; align-items: center; transition: transform .15s, background .2s, color .2s, box-shadow .2s;
}
.btn--solid { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--blue); }
.btn--solid:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--blue); }
.btn--solid:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--blue); }
.btn--line { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }

.hero-specs { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--hair); }
.hero-specs > div { padding: .9rem 1.3rem .9rem 0; margin-right: 1.3rem; border-right: 1px dotted var(--hair); }
.hero-specs > div:last-child { border-right: none; }
.hero-specs dt { font-family: var(--f-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.hero-specs dd { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; margin-top: .1rem; }

/* hero schematic */
.hero-schematic { position: relative; justify-self: center; padding: 1.5rem; }
.schematic { width: clamp(220px, 32vw, 360px); height: auto; color: var(--ink); }
.schematic .ln { stroke: var(--ink); stroke-width: 1.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.schematic .ln--accent { stroke: var(--blue); stroke-width: 1.4; }
.schematic .ln--dot { fill: var(--cyan); stroke: none; }

.dim { position: absolute; font-family: var(--f-mono); font-size: .64rem; color: var(--ink-soft); display: flex; align-items: center; gap: .4rem; }
.dim-line { background: var(--hair); display: block; }
.dim--top { top: .2rem; left: 50%; transform: translateX(-50%); flex-direction: column; }
.dim--top .dim-line { width: 1px; height: 18px; }
.dim--side { top: 50%; right: -.2rem; transform: translateY(-50%); }
.dim--side .dim-line { width: 18px; height: 1px; }
.schematic-cap { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-align: center; color: var(--ink-soft); margin-top: .8rem; }

/* marquee */
.marquee { margin-top: clamp(2.5rem, 5vw, 4rem); border-block: 1px solid var(--hair); overflow: hidden; }
.marquee-track { display: flex; gap: 1.4rem; align-items: center; white-space: nowrap; padding: .7rem 0;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .14em; color: var(--ink-soft);
  animation: scroll 30s linear infinite; will-change: transform; }
.marquee-track span:nth-child(even) { color: var(--blue); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* =========================================================
   Sections — common
   ========================================================= */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.section + .section { border-top: 1px solid var(--hair-soft); }

.sec-head { display: flex; align-items: flex-start; gap: clamp(1rem, 3vw, 2rem); margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.sec-no {
  font-family: var(--f-mono); font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 700;
  color: var(--blue); line-height: 1; flex: none; padding-top: .2rem;
  border-bottom: 2px solid var(--cyan);
}
.sec-head h2 {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.7rem, 4.2vw, 2.8rem); line-height: 1.08; margin-top: .5rem; max-width: 20ch;
}

/* ---------- 01 Studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--gap); align-items: start; }
.studio-lede { font-size: clamp(1.08rem, 2vw, 1.35rem); line-height: 1.5; color: var(--ink); max-width: 30ch; }
.spec-cards { display: grid; gap: 1rem; }
.card {
  position: relative; background: var(--paper-warm); border: 1px solid var(--hair);
  padding: 1.4rem 1.4rem 1.4rem 1.5rem; transition: transform .2s, box-shadow .2s;
}
.card::before, .card::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--blue); }
.card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(15,42,67,.08); }
.card-no, .feature-no { font-family: var(--f-mono); font-size: .72rem; color: var(--cyan); letter-spacing: .08em; }
.card h3, .feature h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; margin: .35rem 0 .4rem; letter-spacing: -.01em; }
.card p, .feature p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- 02 Elvy ---------- */
.elvy-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }

.elvy-diagram { position: relative; justify-self: center; padding: 1rem 2.5rem; }
.callout {
  position: absolute; z-index: 3; font-family: var(--f-mono); font-size: .66rem; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--hair); padding: .3rem .5rem; white-space: nowrap;
  display: flex; align-items: center; gap: .35rem;
}
.callout b { color: var(--blue); }
.callout .lead { position: absolute; height: 1px; background: var(--blue); }
.callout--1 { top: 14%; left: -1.5rem; }
.callout--1 .lead { width: 42px; right: -46px; top: 50%; }
.callout--2 { top: 42%; right: -1rem; }
.callout--2 .lead { width: 38px; left: -42px; top: 50%; }
.callout--3 { bottom: 16%; left: -2rem; }
.callout--3 .lead { width: 46px; right: -50px; top: 50%; }
@media (max-width: 1024px) { .callout { display: none; } }

/* App screenshot */
.phone-shot {
  display: block; width: clamp(230px, 30vw, 270px); height: auto;
  border-radius: 34px;
  box-shadow: 0 22px 50px rgba(15,42,67,.22);
}

.elvy-features { display: grid; gap: 1.4rem; }
.feature { padding-left: 1.1rem; border-left: 1px solid var(--hair); }
.feature:hover { border-left-color: var(--blue); }

/* ---------- 03 Platforms ---------- */
.plat-panel {
  background: var(--ink); color: #fff; padding: clamp(1.8rem, 5vw, 3rem); position: relative; overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.plat-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 16px; height: 16px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.plat-panel::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 16px; height: 16px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.plat-copy { font-size: clamp(1.1rem, 2.2vw, 1.45rem); max-width: 34ch; font-family: var(--f-display); font-weight: 500; line-height: 1.35; }
.store-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.8rem 0 1.2rem; }
.store {
  display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff;
  border: 1px solid rgba(255,255,255,.25); padding: .7rem 1.2rem; transition: border-color .2s, background .2s;
}
.store:hover { border-color: var(--cyan); background: rgba(43,179,192,.1); }
.store svg { color: #fff; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-family: var(--f-mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.store b { font-family: var(--f-display); font-size: 1rem; }
.plat-note { font-family: var(--f-mono); font-size: .75rem; color: rgba(255,255,255,.7); }
.plat-note a { color: var(--cyan); }

/* ---------- 04 Field data ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.stat { background: var(--paper-warm); padding: 1.5rem 1.3rem; }
.stat dt { font-family: var(--f-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.stat dd { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1; margin: .4rem 0 .3rem; letter-spacing: -.02em; }
.stat dd span { color: var(--blue); }
.stat p { font-size: .82rem; color: var(--ink-soft); }

.quote { margin-top: clamp(2rem, 5vw, 3rem); border-left: 3px solid var(--blue); padding: .3rem 0 .3rem 1.6rem; max-width: 52ch; }
.quote blockquote { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.4; letter-spacing: -.01em; }
.quote figcaption { font-family: var(--f-mono); font-size: .78rem; color: var(--ink-soft); margin-top: 1rem; display: flex; align-items: center; gap: .6rem; }
.q-line { width: 28px; height: 1px; background: var(--cyan); display: block; }

/* ---------- 05 Contact ---------- */
.section--contact { padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact-block { position: relative; border: 1px solid var(--hair); background: var(--paper-warm); padding: clamp(2rem, 6vw, 4rem); text-align: center; max-width: 760px; margin-inline: auto; }
.contact-block::before, .contact-block::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--blue); }
.contact-block::before { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.contact-block::after { bottom: 12px; right: 12px; border-left: none; border-top: none; }
.contact-block .sec-no { display: inline-block; border: none; border-bottom: 2px solid var(--cyan); margin-bottom: 1rem; }
.contact-block .eyebrow { justify-content: center; }
.contact-block h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -.02em; margin: .8rem 0; }
.contact-lede { color: var(--ink-soft); max-width: 42ch; margin: 0 auto 1.8rem; }
.email-link {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--f-mono);
  font-size: clamp(1rem, 2.5vw, 1.35rem); color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); padding: .8rem 1.4rem; transition: background .2s, color .2s, transform .15s;
}
.email-link:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.email-link svg { color: var(--blue); transition: color .2s; }
.email-link:hover svg { color: var(--cyan); }
.contact-meta { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-soft); margin-top: 1.4rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--hair); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: var(--gap); align-items: start; }
.footer-brand .brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; }
.footer-brand p { color: var(--ink-soft); font-size: .92rem; max-width: 30ch; margin-top: .3rem; }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a { text-decoration: none; color: var(--ink-soft); font-size: .92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--blue); }
.footer-made { font-family: var(--f-mono); font-size: .82rem; text-align: right; color: var(--ink); }
.footer-made small { color: var(--ink-soft); font-size: .72rem; }

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* SVG draw-on */
.schematic .draw .ln { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.hero-schematic.in .draw .ln { animation: draw 1.4s var(--ease) forwards; }
.hero-schematic.in .draw .ln:nth-child(2) { animation-delay: .14s; }
.hero-schematic.in .draw .ln:nth-child(3) { animation-delay: .28s; }
.hero-schematic.in .draw .ln:nth-child(4) { animation-delay: .36s; }
.hero-schematic.in .draw .ln:nth-child(5) { animation-delay: .46s; }
.hero-schematic.in .draw .ln:nth-child(6) { animation-delay: .54s; }
.hero-schematic.in .draw .ln:nth-child(7) { animation-delay: .66s; }
.hero-schematic.in .draw .ln:nth-child(8) { animation-delay: .76s; }
.hero-schematic.in .draw .ln:nth-child(9) { animation-delay: .88s; }
.hero-schematic.in .draw .ln:nth-child(10) { animation-delay: .98s; }
.hero-schematic.in .draw .ln--dot { animation: pop .4s var(--ease) 1.18s forwards; opacity: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .studio-grid { grid-template-columns: 1fr; }
  .elvy-grid { grid-template-columns: 1fr; }
  .elvy-diagram { order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-made { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 620px) {
  .stat-band { grid-template-columns: 1fr 1fr; }
  .hero-specs > div { border-right: none; padding-right: 0; margin-right: 0; flex: 1 1 40%; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-made { text-align: left; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .grid-layer, .marquee-track { animation: none !important; }
  .schematic .draw .ln { stroke-dashoffset: 0 !important; }
  .schematic .ln--dot { opacity: 1 !important; }
}
