/* Allveltro — base: fonts, tokens, reset, typography, layout, header, buttons, footer. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand palette (brand/logo-sheet.png) */
  --ink: #181715;
  --surface-dark: #1e1d19;
  --raised-dark: #262520;
  --bone: #e0ded4;
  --paper: #f4f1ea;
  --terracotta: #d08e71;
  --terracotta-deep: #a8492e;
  --stone: #969286;
  /* Derived: second text on light (Stone fails contrast on Paper) */
  --graphite: #5c584f;
  /* Interface status colours — only inside product mock-ups, never in the brand mark */
  --status-ok: #8fb27a;
  --status-warn: #d9a548;

  --font-display: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 10vw, 128px);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme-dark {
  --bg: var(--ink);
  --fg: var(--bone);
  --muted: var(--stone);
  --accent: var(--terracotta);
  --surface: var(--surface-dark);
  --raised: var(--raised-dark);
  --line: rgb(224 222 212 / 0.11);
  --line-strong: rgb(224 222 212 / 0.22);
  --on-accent: var(--ink);
  background: var(--bg);
  color: var(--fg);
}

.theme-light {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--graphite);
  --accent: var(--terracotta-deep);
  --surface: #fbfaf6;
  --raised: #ffffff;
  --line: #e0ded4;
  --line-strong: #cfccbf;
  --on-accent: var(--paper);
  background: var(--bg);
  color: var(--fg);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent, var(--terracotta));
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--terracotta);
  color: var(--ink);
}

.nowrap {
  white-space: nowrap;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--terracotta);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* ---------- Typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.display,
.h2,
.h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1.02;
}

.h2 {
  font-size: clamp(2rem, 4.4vw, 3.375rem);
  line-height: 1.06;
}

.h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.text-muted {
  color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgb(24 23 21 / 0.94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: rgb(224 222 212 / 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  flex: none;
  color: var(--bone);
  text-decoration: none;
}
.brand .logo {
  height: 26px;
  width: auto;
}

/* Matches the dot inside the sprite symbols; the colour resolves per <use> instance */
.logo-dot {
  fill: var(--accent, var(--terracotta));
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
}
.nav a {
  position: relative;
  padding-block: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--bone);
}
.nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--terracotta);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
}
.nav-toggle .icon-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 760px) {
  .js .nav-toggle {
    display: inline-flex;
  }
  .js .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--surface-dark);
    border-bottom: 1px solid rgb(224 222 212 / 0.14);
    box-shadow: 0 28px 48px -12px rgb(0 0 0 / 0.65);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .js .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .js .nav a {
    padding: 14px 0;
    font-size: 1.125rem;
    border-bottom: 1px solid rgb(224 222 212 / 0.08);
  }
  .js .nav a:last-child {
    border-bottom: 0;
  }
  .js .nav a[aria-current="true"]::after {
    display: none;
  }
  /* Without JS the nav stays a wrapped row of links and the header grows to fit it */
  .nav {
    flex-wrap: wrap;
    gap: 4px 14px;
  }
  html:not(.js) .site-header {
    height: auto;
    min-height: var(--header-h);
  }
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 12px;
  }
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}
.btn:hover svg {
  transform: translateY(2px);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--fg);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--bone);
}
.footer-brand .logo {
  height: 22px;
  width: auto;
}
.footer-tagline,
.footer-copy {
  font-size: 0.875rem;
  color: var(--stone);
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
.footer-contact {
  font-style: normal;
  font-size: 0.9375rem;
}
/* Padding lifts the link to a 24px+ touch target */
.footer-contact a {
  display: inline-block;
  padding-block: 4px;
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.footer-contact a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* ---------- Reveal on scroll (enabled by JS only) ---------- */

/* Uses the individual `translate` property so components keep `transform` for their own hover */
.js .reveal {
  --reveal-transition: opacity 0.7s var(--ease) var(--reveal-delay, 0s),
    translate 0.7s var(--ease) var(--reveal-delay, 0s);
  opacity: 0;
  translate: 0 18px;
  transition: var(--reveal-transition);
}
.js .reveal.is-visible {
  opacity: 1;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    translate: none;
  }
}

@media print {
  .js .reveal {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important;
  }
  .site-header {
    position: static;
  }
  .nav-toggle,
  .skip-link {
    display: none;
  }
}
