/* =========================================================================
   Wayforé Studio — 2025 rebuild (revision pass)
   Plain, quiet parchment. Display type (Augustus) is reserved for the site
   name and section headings only; everything else is New York. Restraint cue
   taken from pg-lang.com: generous whitespace, no decorative imagery.
   ========================================================================= */

/* ---- Self-hosted fonts ------------------------------------------------- */
/* Augustus ships as a 1999 TrueType conversion Chrome's OTS rejects; these are
   the same font re-serialized clean (woff2 + ttf fallback). */
@font-face{
  font-family:'Augustus';
  src:url('fonts/Augustus.woff2') format('woff2'),
      url('fonts/Augustus.clean.ttf') format('truetype');
  font-weight:400;font-style:normal;font-display:swap;
}
@font-face {
  font-family: 'New York';
  src: url('/fonts/NewYork.woff2') format('woff2');
  font-weight:400;font-style:normal;font-display: swap;
}

:root{
  --paper:#F3F1EA;          /* flat parchment — the one background colour */
  --paper-panel:#EEEBE1;    /* faint step for the drawer panel */
  --ink:#11100E;--ink:#14120E;   /* headings / emphasis */
  --ink-2:#1E1B16;          /* body copy — high contrast on parchment */
  --ink-soft:#4A463D;       /* eyebrows, secondary — still readable */
  --ink-faint:#8B8578;      /* hairlines, dim vertices */
  --line:#14120E;
  --hair:rgba(20,18,14,.14);
  --shadow:rgba(20,18,14,.20);
  --display:'Augustus','Times New Roman',Georgia,serif;
  --body:'NewYork',Georgia,'Times New Roman',serif;
  --danger:#8A1F1F;
  --head-h:60px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--paper)}
body{
  margin:0;background:var(--paper);color:var(--ink-2);
  font-family:var(--body);font-size:18px;line-height:1.6;
  text-rendering:optimizeLegibility;overflow-x:hidden;position:relative;
  -webkit-tap-highlight-color:transparent;
}
img,canvas,svg{max-width:100%}
::selection{background:rgba(20,18,14,.16)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.wrap{position:relative;z-index:2;width:100%;max-width:1180px;margin:0 auto;padding:0 32px}

/* Augustus is reserved for the wordmark + section headings; nothing else. */
h1,h2,h3,h4,p,a,span,summary,label,input,select,textarea,button{font-family:var(--body)}
h2{font-family:var(--display);font-weight:400;letter-spacing:.01em;line-height:1.1}
h3{font-weight:400;line-height:1.25}
p{margin:0 0 1rem}
p:last-child{margin-bottom:0}
a{color:inherit}

.eyebrow{font-size:.72rem;font-weight:400;letter-spacing:.26em;text-transform:uppercase;color:var(--ink-soft);margin:0 0 1.1rem}

/* ---- Header (minimal) -------------------------------------------------- */
/* Fixed (not sticky) so it stays out of flow: every slide can start at 0 and be
   exactly one viewport tall, and the hero sits tight beneath the header. */
header{position:fixed;top:0;left:0;right:0;z-index:40;backdrop-filter:blur(7px);
  background:color-mix(in srgb, var(--paper) 82%, transparent);border-bottom:1px solid var(--hair)}
.nav{display:flex;align-items:center;justify-content:space-between;gap:22px;height:var(--head-h)}
.brand{font-family:var(--display);font-size:1.34rem;letter-spacing:.05em;white-space:nowrap;
  display:inline-flex;align-items:baseline;gap:.55rem;text-decoration:none;color:var(--ink)}
.brand small{font-family:var(--body);font-size:.58rem;letter-spacing:.3em;color:var(--ink-faint);
  text-transform:uppercase;transform:translateY(-1px)}
.nav-cta{font-size:.82rem;letter-spacing:.02em;color:var(--paper);background:var(--ink);
  padding:.58rem 1.05rem;border-radius:2px;text-decoration:none;white-space:nowrap;transition:.25s}
.nav-cta:hover{background:#000;transform:translateY(-1px)}

/* ---- Buttons ----------------------------------------------------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;text-decoration:none;
  font-size:.95rem;letter-spacing:.01em;padding:.85rem 1.4rem;border-radius:2px;transition:.25s;cursor:pointer;touch-action:manipulation}
.btn-ink{background:var(--ink);color:var(--paper);border:1px solid var(--ink)}
.btn-ink:hover{background:#000;transform:translateY(-1px)}
.arrow{font-size:1.05rem;line-height:0}

/* ---- Slides (scroll-snap sections) ------------------------------------- */
.slide{min-height:100svh;display:flex;flex-direction:column;justify-content:center;
  position:relative;padding:calc(var(--head-h) + 24px) 0 48px}
#contact.slide{justify-content:flex-start;padding-top:calc(var(--head-h) + 56px)}

/* ---- HERO -------------------------------------------------------------- */
.hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,520px);
  gap:64px;align-items:center}

/* left — headline, clarity strip, body copy */
.hero-title{font-family:var(--display);font-weight:400;letter-spacing:.01em;line-height:1.06;
  font-size:clamp(2.2rem,4.6vw,3.5rem);color:var(--ink);margin:0 0 1.6rem;max-width:14ch}
/* Numbered items read like the figure captions under the globe. */
.hero-strip{list-style:none;margin:0 0 1.6rem;padding:1rem 0;display:flex;flex-wrap:wrap;
  gap:.6rem 2.2rem;border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.hero-strip li{display:inline-flex;align-items:baseline;gap:.5rem}
.hero-strip .n{font-size:.72rem;letter-spacing:.22em;color:var(--ink-faint);font-variant-numeric:tabular-nums}
.hero-strip .t{font-style:italic;font-size:.9rem;letter-spacing:.02em;color:var(--ink-soft)}
.hero-body{font-family:var(--body);font-size:1.06rem;line-height:1.6;color:var(--ink-2);max-width:38ch;margin:0}

/* right — sphere plate */
.hero-center{align-self:center}
.plate{position:relative;margin:0;padding:16px}
.plate .corner{position:absolute;width:11px;height:11px;border:1.4px solid var(--line);opacity:.65}
.plate .corner.tl{top:0;left:0;border-right:none;border-bottom:none}
.plate .corner.tr{top:0;right:0;border-left:none;border-bottom:none}
.plate .corner.bl{bottom:0;left:0;border-right:none;border-top:none}
.plate .corner.br{bottom:0;right:0;border-left:none;border-top:none}
.stage{position:relative}
.plate-canvas{width:100%;aspect-ratio:1/1;display:block;position:relative;z-index:1}
.plate-cap{margin-top:12px;text-align:center}
.plate-cap .t{font-family:var(--body);font-style:italic;font-size:.9rem;color:var(--ink-soft);letter-spacing:.02em}

/* margin note — sketchbook aside tucked in the stage's bottom-left corner, the
   one area no vertex label reaches (the lower vertices are "soon" dots, which
   carry no label). z-index sits under .verts so a label always wins if the sway
   ever brings one this far down. */
.globe-note{position:absolute;left:-10px;bottom:-2px;z-index:2;margin:0;pointer-events:none;
  display:flex;align-items:flex-end;gap:.3rem;transform:rotate(-4deg);transform-origin:left bottom}
.globe-note .gn-t{font-family:var(--body);font-style:italic;font-size:.76rem;line-height:1.3;
  letter-spacing:.01em;color:var(--ink-faint);max-width:7.6rem}
.globe-note .gn-a{flex:none;width:46px;height:31px;color:var(--ink-faint);opacity:.85;margin-bottom:.15rem}

/* vertices overlay — markers projected onto the sphere each frame by script.js */
.verts{position:absolute;inset:0;z-index:3;pointer-events:none}
.vert{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;
  text-decoration:none;width:0;height:0;will-change:left,top,opacity}
.vdot{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:12px;height:12px;border-radius:50%;
  background:var(--ink);box-shadow:0 0 0 4px var(--paper),0 0 10px 2px rgba(20,18,14,.28);transition:transform .18s ease}
.vert.live{pointer-events:auto;cursor:pointer}
.vert.live::after{content:"";position:absolute;left:0;top:0;width:26px;height:26px;transform:translate(-50%,-50%);
  border-radius:50%;border:1px solid var(--line);opacity:.28;transition:opacity .22s ease,transform .22s ease}
.vert.live:hover .vdot,.vert.live:focus-visible .vdot{transform:translate(-50%,-50%) scale(1.2)}
.vert.live:hover::after,.vert.live:focus-visible::after{opacity:.6;transform:translate(-50%,-50%) scale(1.3)}
.vert.soon .vdot{width:7px;height:7px;background:var(--ink-faint);box-shadow:0 0 0 4px var(--paper)}

/* label: short by default, full site name on hover */
.vlabel{position:absolute;left:0;bottom:12px;transform:translateX(-50%);white-space:nowrap;
  font-size:.74rem;letter-spacing:.03em;color:var(--ink);background:var(--paper);
  border:1px solid var(--hair);padding:.24rem .5rem;border-radius:2px;box-shadow:0 6px 16px -10px var(--shadow)}
.vlabel .v-full{display:none}
.vlabel em{font-style:normal;color:var(--ink-soft);margin-left:.15rem}
.vert.live:hover .vlabel .v-short,.vert.live:focus-visible .vlabel .v-short{display:none}
.vert.live:hover .vlabel .v-full,.vert.live:focus-visible .vlabel .v-full{display:inline}

/* ---- Section heads ----------------------------------------------------- */
.sec-head{margin-bottom:40px}
.sec-head h2{font-size:clamp(2rem,4.4vw,3.2rem);margin:0}

/* ---- AUTOMATIONS ------------------------------------------------------- */
.automations{padding-top:var(--head-h);padding-bottom:0}
.auto-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center;
  width:100%;padding-left:max(32px, calc((100% - 1180px)/2 + 32px))}
.auto-copy h2{font-size:clamp(1.9rem,3.4vw,2.7rem);margin:0 0 1.4rem;max-width:16ch;letter-spacing:.01em}
.auto-copy .auto-hint{color:var(--ink-soft);font-style:italic;font-size:.95rem;margin:0}
.auto-drawer{position:relative;min-height:70vh;border-left:1px solid var(--hair);background:var(--paper-panel)}
#automations-root{position:relative;height:100%;min-height:70vh}
#automations-root .fd-scene{border:none;height:100%;background:var(--paper-panel)}

/* ---- FileDrawer sharpening (container-side overrides, JSX untouched) ----
   Higher specificity than the component's own rules so the files read as crisp,
   real UI rather than a soft photo: tighter shadows, no blur flattening depth. */
#automations-root .fd-file{
  box-shadow:0 10px 20px -10px rgba(20,18,14,.30),
             0 2px 5px rgba(20,18,14,.18),
             inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#automations-root .fd-file:hover,#automations-root .fd-file:focus-visible{
  box-shadow:0 22px 40px -18px rgba(20,18,14,.38),
             0 6px 12px rgba(20,18,14,.20),
             inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#automations-root .fd-tab{text-rendering:geometricPrecision}

/* ---- SECURITY (text left · orbiting stack right) ----------------------- */
.sec-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center}
.sec-copy h2{font-size:clamp(1.7rem,3.4vw,2.5rem);margin:0 0 1.6rem;max-width:20ch}
.sec-copy p{color:var(--ink-2);line-height:1.65;max-width:32rem;font-size:1.02rem}
/* Two distinct sub-blocks under one heading: what we build with, and security. */
.sec-sub{margin-top:1.5rem}
.sec-sub:first-of-type{margin-top:0}
.sec-sub h3{margin:0 0 .5rem;font-family:'NewYork',Georgia,'Times New Roman',serif;
  font-size:.74rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--ink)}
.sec-sub p{margin:0}
.sec-visual{display:flex;justify-content:center;align-items:center;min-height:340px}

/* Orbit: icons ride a ring that turns slowly; each icon counter-rotates so it
   (and its label) stays upright and readable. */
.orbit{position:relative;width:300px;height:300px}
.orbit-ring{position:absolute;inset:0;animation:orbit-spin 52s linear infinite}
.orbit-item{position:absolute;left:50%;top:50%;
  transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y)))}
.oi{display:flex;flex-direction:column;align-items:center;gap:8px;
  animation:orbit-spin-rev 52s linear infinite}
.oi-mark{display:grid;place-items:center;width:46px;height:46px;color:var(--ink);
  filter:drop-shadow(0 2px 5px rgba(20,18,14,.12))}
.oi-mark svg{display:block;width:100%;height:100%;fill:currentColor}
.oi-label{font-size:.68rem;letter-spacing:.03em;color:var(--ink-soft);white-space:nowrap}
.orbit-core{position:absolute;left:50%;top:50%;width:7px;height:7px;transform:translate(-50%,-50%);
  border-radius:50%;background:var(--ink);opacity:.5;
  box-shadow:0 0 0 10px color-mix(in srgb, var(--ink) 6%, transparent)}
@keyframes orbit-spin{to{transform:rotate(360deg)}}
@keyframes orbit-spin-rev{to{transform:rotate(-360deg)}}

/* ---- CONTACT ----------------------------------------------------------- */
.contact{border:1px solid var(--hair);border-radius:3px;background:var(--paper);
  display:grid;grid-template-columns:.9fr 1.1fr}
.contact .left{padding:44px;border-right:1px solid var(--hair)}
.contact .left h3{font-size:clamp(1.5rem,3.2vw,2rem);margin:0 0 1rem;line-height:1.15;color:var(--ink)}
.contact .left p{color:var(--ink-2);line-height:1.6;max-width:24rem}
.contact .left .sign{margin-top:1.8rem;font-style:italic;font-size:1.05rem;color:var(--ink)}
.contact .right{padding:44px}
.field{margin-bottom:20px}
.field label{display:block;font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:9px}
.field input,.field select,.field textarea{width:100%;background:transparent;border:none;
  border-bottom:1px solid var(--ink-faint);padding:9px 2px;font-family:var(--body);font-size:1rem;color:var(--ink);transition:.2s}
.field input::placeholder,.field textarea::placeholder{color:var(--ink-faint)}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--line);box-shadow:0 1px 0 var(--line)}
.field select{appearance:none;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-soft) 50%),linear-gradient(135deg,var(--ink-soft) 50%,transparent 50%);
  background-position:calc(100% - 12px) 55%,calc(100% - 7px) 55%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:26px}
.field textarea{resize:vertical;min-height:74px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.form-note{font-size:.86rem;min-height:1.2rem;margin-top:6px}

/* ---- Footer (inside contact slide) ------------------------------------ */
footer{margin-top:44px}
.foot{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  padding-top:24px;border-top:1px solid var(--hair)}
.foot .brand{font-family:var(--display);font-size:1.05rem;letter-spacing:.04em}
.foot nav{display:flex;gap:22px;flex-wrap:wrap}
.foot a{color:var(--ink-soft);text-decoration:none;font-size:.85rem}
.foot a:hover{color:var(--ink)}
.foot .c{font-size:.78rem;color:var(--ink-faint);letter-spacing:.03em;margin:0}

/* ---- Motion / reveal --------------------------------------------------- */
.reveal{opacity:0;transform:translateY(20px);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.3,1)}
.reveal.in{opacity:1;transform:none}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--line);outline-offset:3px}
.skip{position:absolute;left:-9999px;top:0;background:var(--ink);color:var(--paper);padding:.6rem 1rem;border-radius:2px;z-index:100}
.skip:focus{left:12px;top:12px}

/* ---- Scroll-snap: deliberate slide-to-slide movement ------------------------
   Mandatory + scroll-snap-stop:always so one scroll/swipe lands on exactly one
   section and a fast flick can't skip past one. Disabled only on very short
   viewports (where a section can exceed the height) and for reduced-motion. */
@media (min-height:660px){
  html{scroll-snap-type:y mandatory;scroll-padding-top:var(--head-h)}
  .slide{scroll-snap-align:start;scroll-snap-stop:always}
}

/* ---- Responsive -------------------------------------------------------- */
@media(max-width:1000px){
  /* Hero sits tight under the header (top-aligned) instead of vertically
     centred, so there's no gap pushing the copy down. */
  .hero.slide{justify-content:flex-start;padding-top:calc(var(--head-h) + 12px)}
  .hero-grid{grid-template-columns:1fr;gap:22px;justify-items:center;text-align:center;max-width:460px;margin:0 auto}
  /* Stack: headline → clarity strip → body copy (all inside .hero-left, in DOM
     order) → globe. */
  .hero-left{order:1;width:100%}
  .hero-center{order:2;width:100%}
  .hero-title{margin:0 0 1.1rem;max-width:none}
  .hero-strip{justify-content:center;gap:.5rem 1.6rem;margin-bottom:1.1rem}
  .hero-body{max-width:36rem;margin:0 auto}
  /* Stacked globe is narrower — shrink the margin note so it still clears the
     sphere's lower-left edge, and keep it left-aligned against the centred column. */
  .globe-note{left:-6px;bottom:0;gap:.25rem;text-align:left}
  .globe-note .gn-t{font-size:.7rem;max-width:6.6rem}
  .globe-note .gn-a{width:36px;height:24px}
  /* Top-align (like the hero) so the heading sits under the header with no
     vertical-centring gap above it. Also kill the fixed-header double offset:
     the page reserves header height twice on a snapped slide — once via
     html{scroll-padding-top} and again via each slide's padding-top — leaving
     ~2x header height of dead space above every section label on mobile. Each
     slide's own padding-top already clears the fixed header, so drop the
     scroll-padding and give these slides one tight, uniform top gap. */
  html{scroll-padding-top:0}
  .automations.slide,.security.slide{justify-content:flex-start}
  .automations.slide,.security.slide,#contact.slide{padding-top:calc(var(--head-h) + 18px)}
  /* Automations fills exactly one viewport on mobile so the card component owns
     the vertical space and its scroll-gate can step through cards without the
     section itself scrolling. Copy takes its natural height; the drawer flexes
     to fill whatever is left. */
  .automations.slide{height:100svh;overflow:hidden;padding-bottom:14px}
  .auto-grid{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding-left:0;flex:1 1 auto;min-height:0;width:100%}
  .auto-copy{padding:0 24px;flex:0 0 auto}
  .auto-drawer{margin:0;border-left:none;border-top:1px solid var(--hair);flex:1 1 auto;min-height:0}
  #automations-root{min-height:0;height:100%}
  .security.slide{min-height:100svh}
  .sec-grid{grid-template-columns:1fr;gap:36px;text-align:center;justify-items:center}
  .sec-copy p{margin-left:auto;margin-right:auto}
  .contact{grid-template-columns:1fr}
  .contact .left{border-right:none;border-bottom:1px solid var(--hair)}
}
@media(max-width:640px){
  body{font-size:17px}
  .wrap{padding:0 20px}
  .slide{min-height:100svh;padding:calc(var(--head-h) + 16px) 0 40px}
  .hero.slide{padding-top:calc(var(--head-h) + 8px)}
  /* Below ~400px of canvas the note would sit on top of the sphere instead of
     beside it, and the hero is already vertically tight — drop it. */
  .globe-note{display:none}
  .auto-copy{padding:0 20px}
  .contact .left,.contact .right{padding:28px}
  .two{grid-template-columns:1fr}
  .nav-cta{padding:.5rem .85rem}
  .brand{font-size:1.18rem}
  .brand small{display:none}
  .foot{justify-content:center;text-align:center}
  /* smaller orbit so it fits a phone width */
  .orbit{width:230px;height:230px;transform:scale(.86)}
}
/* short viewports: let content breathe instead of forcing a tall slide */
@media(max-height:660px){
  .slide{min-height:auto;padding:calc(var(--head-h) + 28px) 0 44px}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .reveal{opacity:1!important;transform:none!important}
  html{scroll-behavior:auto;scroll-snap-type:none}
  .orbit-ring,.oi{animation:none!important}
}
