/* Ember Labs — site styles
   Restrained, editorial. Flat colour, hairline rules, generous space. No gradients, no shadows. */
:root {
  --bg: #FFFFFF;
  --panel: #F6F5F2;
  --ink: #16161A;
  --ink-2: #44444C;
  --muted: #6B6B74;
  --line: #E4E2DD;
  --accent: #B8441F;
  --radius: 4px;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111114;
    --panel: #19191D;
    --ink: #F3F2EE;
    --ink-2: #CFCEC9;
    --muted: #9B9AA3;
    --line: #2B2B31;
    --accent: #E8845F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 200; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(42px, 6.4vw, 72px); }
h2 { font-size: clamp(30px, 3.8vw, 44px); }
h3 { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
.eyebrow { font: 600 13px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px; }
.lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.6; color: var(--ink-2); max-width: 34em; }
.muted { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 24px/1 var(--font-display); letter-spacing: -.01em; min-height: 44px; }
.logo svg { width: 18px; height: 18px; color: var(--accent); }
.logo:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .nav { height: 68px; }
  .menu-btn { display: inline-flex; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li + li { border-top: 1px solid var(--line); }
  .nav-links a { width: 100%; font-size: 17px; border-bottom: 0 !important; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: var(--radius); font: 600 15px/1 var(--font-body); text-decoration: none; border: 1px solid var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; touch-action: manipulation; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.link-arrow svg { width: 15px; height: 15px; }

/* Sections */
.hero { padding: clamp(80px, 12vw, 168px) 0 clamp(72px, 10vw, 136px); }
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 36px; }
.page-hero { padding: clamp(72px, 10vw, 144px) 0 clamp(48px, 6vw, 88px); }
.page-hero h1 { font-size: clamp(38px, 5.2vw, 60px); max-width: 15em; }
.page-hero .lede { margin-top: 28px; }
.section { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.section.plain { border-top: 0; }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 + p { color: var(--ink-2); font-size: 19px; margin-top: 20px; }

/* Home: products */
.product-row { display: grid; gap: clamp(32px, 6vw, 88px); grid-template-columns: 1fr; align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.product-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .product-row { grid-template-columns: 5fr 7fr; } .product-row.flip .product-copy { order: 2; } }
.product-name { display: flex; align-items: center; gap: 12px; font: 600 13px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.product-name img, .product-name svg { width: 28px; height: 28px; border-radius: 6px; }
.product-copy h3 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 18px; }
.product-copy p { color: var(--ink-2); max-width: 28em; margin-bottom: 28px; }
.media { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); display: flex; justify-content: center; align-items: center; }
.media img { border: 1px solid var(--line); background: var(--bg); }
.media .phone { width: min(100%, 250px); border-radius: 30px; }
.media .browser { width: 100%; max-width: none; border-radius: 6px; }
.media:has(.browser) { padding: clamp(16px, 2.5vw, 32px); }
.media.clip-phone { align-items: flex-start; padding-bottom: 0; height: 420px; overflow: hidden; }
.media.clip-phone .phone { border-bottom: 0; border-radius: 30px 30px 0 0; }

/* Ruled lists replace cards */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; gap: 8px 48px; grid-template-columns: 1fr; padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .row { grid-template-columns: 5fr 7fr; padding: 40px 0; } }
.row h3 { font-size: 24px; }
.row p { margin: 0; color: var(--ink-2); max-width: 36em; }
.row .num { display: block; font: 600 13px/1 var(--font-body); letter-spacing: .1em; color: var(--accent); margin-bottom: 14px; }

.split-text { display: grid; gap: 24px 80px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split-text { grid-template-columns: 5fr 7fr; } }
.split-text p { color: var(--ink-2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 36px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.tags li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; background: var(--muted); border-radius: 50%; margin: 0 28px 3px 0; vertical-align: middle; }
@media (max-width: 560px) { .tags li + li::before { display: none; } }

/* Closing */
.closing { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(72px, 9vw, 120px) 0; }
.closing h2 { max-width: 14em; }
.closing p { color: var(--ink-2); font-size: 19px; max-width: 30em; margin-top: 20px; }

/* About */
.prose h2 { font-size: 30px; margin: 56px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }
.facts { margin: 0; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.fact dt { font: 600 13px/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 0; font-weight: 500; }
@media (min-width: 640px) { .fact { grid-template-columns: 220px 1fr; align-items: baseline; } }

/* Contact */
.contact-grid { display: grid; gap: 56px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: 96px; } }
.contact-item { padding: 24px 0; border-top: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 1px solid var(--line); }
.contact-item h3 { font: 600 13px/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contact-item p { margin: 0; color: var(--ink-2); font-size: 17px; }
form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
label { font: 600 14px/1.2 var(--font-body); }
input, select, textarea { width: 100%; font: 400 17px/1.4 var(--font-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; min-height: 50px; transition: border-color .2s; }
textarea { min-height: 170px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.error { font-size: 14px; color: #B3261E; margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .error { color: #FF9A8F; } }
[aria-invalid="true"] { border-color: #B3261E; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 40px; }
.foot-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-grid h4 { font: 600 13px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-grid a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: var(--ink-2); font-size: 16px; }
.foot-grid a:hover { color: var(--accent); }
.foot-note { color: var(--muted); font-size: 15px; max-width: 24em; margin-top: 16px; }
.legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 14px; }

/* Motion: a single quiet fade */
.reveal { opacity: 0; transition: opacity .7s ease; }
.reveal.in { opacity: 1; }
.no-js .reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transition: none; }
  .btn { transition: none; }
}
