/* ============================================================
   Floory, Base: fonts, reset, typography, buttons, a11y
   ============================================================ */

/* ---- Fonts ---- */
/* Single typeface: Google Sans Flex (loaded per page via Google Fonts <link>, wght 400..800).
   Both --font-brand and --font-body resolve to it; no self-hosted faces needed. */

/* ---- Reset ---- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3 { line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; }
/* H1 / title moments (hero H1, page H1s, estimator step titles .fe-q) use --font-brand;
   everything else inherits --font-body. Both are Google Sans Flex. */
h1, .fe-q { font-family: var(--font-brand); }

/* ---- Shared section headings ---- */
.section-eyebrow {
  font-weight: 600; font-size: var(--fs-eyebrow); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange); margin-bottom: var(--sp-3);
}
.section-title { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.03em; }
.section-lead { font-size: var(--fs-lead); color: var(--ink-700); margin-top: var(--sp-3); max-width: 54ch; line-height: 1.6; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-weight: 600; letter-spacing: 0; line-height: 1;
  padding: 0.9rem 1.5rem; min-height: 48px; border-radius: var(--radius-btn);
  transition: transform var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
  will-change: transform; white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary { background: var(--orange); color: var(--white); box-shadow: var(--shadow-cta); }
.btn--primary:hover { background: var(--orange-600); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(21,17,15,0.18); }

/* Ghost on dark imagery */
.btn--ghost { color: var(--white); background: rgba(255,255,255,0.10); border: 1.5px solid rgba(255,255,255,0.6); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* Ghost on light backgrounds */
.btn--ghost-dark { color: var(--black); background: transparent; border: 1.5px solid var(--line); }
.btn--ghost-dark:hover { border-color: var(--black); transform: translateY(-2px); }

.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #2a2320; transform: translateY(-2px); }

.btn--lg { padding: 1.1rem 1.9rem; min-height: 56px; font-size: 1.0625rem; }
.btn--sm { padding: 0.7rem 1.15rem; min-height: 44px; font-size: 0.95rem; }
.btn--block { width: 100%; }

/* Text link CTA */
.link-cta { font-weight: 600; color: var(--white); position: relative; padding: 0.5rem 0.25rem; }
.link-cta::after { content:""; position:absolute; left:0.25rem; right:0.25rem; bottom:0.3rem; height:1.5px; background: currentColor; transform: scaleX(0); transform-origin:left; transition: transform var(--t-med) var(--ease-out); }
.link-cta:hover::after, .link-cta:focus-visible::after { transform: scaleX(1); }
.link-cta--dark { color: var(--black); }

/* ---- Accessibility ---- */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 4px; }

.skip-link {
  position: absolute; left: 50%; top: -120px; transform: translateX(-50%);
  z-index: 200; background: var(--black); color: var(--white);
  padding: 0.85rem 1.25rem; border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600; transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 0; }

.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;
}

/* Scroll-reveal helper (one-time, reduced-motion safe) */
[data-reveal] { opacity: 0; transform: translateY(18px); }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Offset anchor jumps so the sticky announcement bar + header never cover headings */
section[id],
#product, #colours, #how, #reviews, #faq, #quote, #estimate, #why-floory {
  scroll-margin-top: calc(var(--ann-h) + var(--header-h) + 16px);
}
