/* Vidd AI business page: shared tokens, type, nav, buttons, footer, reveal.
   Section styles live in hero.css, story.css, trust.css and more.css. */

:root {
  /* Colour */
  --paper: #FFFDF6;
  --paper-2: #F6F0E2;
  --paper-3: #EDE4CF;
  --ink: #14120E;
  --ink-2: #39352D;
  --stone: #6E675B;
  --line: #EBE4D5;
  --cobalt: #1F49FF;
  --cobalt-deep: #1233C7;
  --sun: #FFC931;
  --success: #1B9E4B;

  /* Type */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --fs-h1: clamp(38px, min(4.55vw, 7.3vh), 70px);
  --fs-h2: clamp(32px, 4vw, 56px);
  --fs-h3: clamp(21px, 1.7vw, 26px);
  --fs-lede: clamp(17px, 1.3vw, 20px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 11.5px;

  /* Space and shape */
  --gutter: clamp(16px, 2.2vw, 32px);
  --wrap: 1240px;
  --section-y: clamp(72px, 10vw, 140px);
  --nav-h: 72px;
  --radius-lg: 34px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 6px rgba(20, 18, 14, .06), 0 24px 60px -30px rgba(20, 18, 14, .4);

  /* Motion */
  --ease: cubic-bezier(.2, .75, .12, 1);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Paper grain, very faint, never catches clicks */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .08  0 0 0 0 .07  0 0 0 0 .05  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main, .foot { position: relative; z-index: 1; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus and skip link ---------- */
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip:focus, .skip:focus-visible { transform: none; outline-color: var(--sun); }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
h2, .h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.035em; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.02em; }
p { text-wrap: pretty; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
}
.kicker::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--sun);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(255, 201, 49, .25);
}
.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.small { font-size: var(--fs-small); color: var(--stone); }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: var(--gutter); }
main > section[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s var(--ease), border-color .2s;
}
.btn:active { transform: translateY(0); }
.btn-cobalt {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 24px -12px rgba(31, 73, 255, .8);
}
.btn-cobalt:hover {
  background: var(--cobalt-deep);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 16px 30px -14px rgba(31, 73, 255, .9);
}
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #FFD457; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: #fff; }
.btn-lg { --h: 58px; font-size: 17px; padding: 0 28px; gap: 14px; }
/* Optional arrow disc inside a button */
.btn .ico {
  width: 32px; height: 32px;
  margin-right: -14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--cobalt);
  transition: transform .35s var(--ease);
}
.btn-lg .ico { width: 40px; height: 40px; margin-right: -19px; }
.btn:hover .ico { transform: rotate(45deg); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 var(--gutter);
  background: rgba(255, 253, 246, .86);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
}
.nav-logo { display: inline-flex; align-items: center; flex: none; padding: 4px 2px; margin-left: clamp(0px, 1.2vw, 16px); border-radius: 10px; }
.nav-logo img { height: 32px; width: auto; }
.nav-links { flex: 1 1 auto; display: flex; justify-content: center; gap: 2px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  transition: background-color .2s, color .2s;
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
/* The page you are on (aria-current="page"). Hover gives the same paper pill, so the current page
   also carries a sunshine underline. One marker for every page: page stylesheets never restyle it. */
.nav-links a[aria-current="page"] { position: relative; background: var(--paper-2); color: var(--ink); font-weight: 600; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--sun);
}
.nav-cta { flex: none; margin-right: clamp(0px, 1.2vw, 16px); }
.nav-menu {
  display: none;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
/* two line menu glyph, becomes an X when open */
.nav-menu::after {
  content: "";
  width: 16px; height: 8px;
  border-top: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transition: transform .25s var(--ease), height .25s var(--ease);
}
.nav-menu[aria-expanded="true"]::after { height: 0; border-bottom: 0; transform: rotate(0); }

.mnav {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  padding: 8px var(--gutter) 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(20, 18, 14, .35);
}
.mnav a:not(.btn) {
  display: block;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.025em;
}
.mnav a[aria-current="page"] { color: var(--cobalt); }
.mnav-cta { margin-top: 18px; width: 100%; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding: 36px var(--gutter) 44px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--stone);
  font-size: var(--fs-small);
}
.foot img { height: 24px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-left: auto; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Reveal on scroll ----------
   Add class "rv" to anything that should rise in; site.js adds "in" when it is visible.
   Hidden only when scripts run and motion is welcome, so nothing is lost without them. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease), transform .9s var(--ease);
    transition-delay: var(--rv-delay, 0s);
  }
  .rv.in { opacity: 1; transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 9px 10px; font-size: 14.5px; }
}
@media (max-width: 980px) {
  .nav { gap: 10px; }
  .nav-links { display: none; }
  .nav-cta { margin: 0 0 0 auto; }
  .nav-menu { display: inline-flex; }
}
@media (min-width: 981px) {
  .mnav { display: none !important; }
}
@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  .nav-logo { margin-left: 0; }
  .nav-logo img { height: 28px; }
  .nav-cta { --h: 40px; padding: 0 16px; font-size: 14.5px; }
  .btn-lg { --h: 54px; font-size: 16.5px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .foot nav { margin-left: 0; }
}
@media (max-width: 350px) {
  .nav-menu { padding: 0 12px; }
}
