/* =========================================================
   Spillo — spillo.se
   Design tokens, layout and components.
   ========================================================= */

:root {
  --cream:          #F6F3EC;
  --cream-light:    #FFF8F1;
  --sand:           #EDE7DA;
  --ink:            #4A1526;
  --ink-deep:       #330E1B;
  --terracotta:     #B7603A;
  --terracotta-dark:#9E4E2C;
  --wheat:          #EBD9C6;
  --field:          #FFFDF8;

  --maxw:   1240px;
  --gutter: clamp(18px, 4vw, 40px);

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans:  'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --header-h: 68px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--terracotta); }
input, textarea, button, select { font-family: inherit; }
::placeholder { color: rgba(74, 21, 38, 0.42); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--terracotta);
  color: var(--cream-light);
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--cream-light); }

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

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

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

.section { padding-block: clamp(72px, 9vw, 132px); }
.section--tight { padding-block: clamp(70px, 9vw, 124px); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.split--wide { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: clamp(34px, 5vw, 72px); }

.band {
  background: var(--sand);
  border-top: 1px solid rgba(74, 21, 38, 0.08);
  border-bottom: 1px solid rgba(74, 21, 38, 0.08);
}
.band--dark { background: var(--ink); color: var(--cream); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.eyebrow--light { color: var(--wheat); margin-bottom: 20px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); display: block; }

.display, .h1, .h2, .h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; }

.display {
  font-size: clamp(44px, 7.2vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 18ch;
  text-wrap: balance;
}
.h1 {
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-wrap: balance;
}
.h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.05; }
.h2--sm { font-size: clamp(31px, 3.8vw, 50px); line-height: 1.06; text-wrap: balance; }
.h2--xs { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; }
.h3 { font-size: clamp(31px, 4vw, 54px); line-height: 1.05; text-wrap: balance; }

.sub-heading { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; font-family: var(--sans); }
.sub-heading--sm { font-size: 19px; }
.sub-heading--md { font-size: 20px; }

.lead { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: rgba(74, 21, 38, 0.78); }
.lead--light { color: rgba(246, 243, 236, 0.82); }

.body-text { margin: 0; font-size: 17px; line-height: 1.65; color: rgba(74, 21, 38, 0.78); }
.body-text + .body-text { margin-top: 16px; }
.body-text--strong { color: var(--ink); font-weight: 600; }
.body-text--muted { font-size: 16.5px; line-height: 1.6; color: rgba(74, 21, 38, 0.72); }
.body-text--light { color: rgba(246, 243, 236, 0.82); font-size: 17.5px; line-height: 1.62; }

em.accent { font-style: italic; color: var(--wheat); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--cream-light);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  padding: 16px 30px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease;
}
.btn:hover { background: var(--terracotta-dark); color: var(--cream-light); }
.btn--sm { font-size: 14.5px; padding: 11px 20px; }
.btn--block { width: 100%; font-size: 16.5px; padding: 16px 24px; }

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(74, 21, 38, 0.28);
  padding-bottom: 3px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.link-underline:hover { color: var(--terracotta); border-color: var(--terracotta); }
.link-underline--light { color: rgba(246, 243, 236, 0.9); border-color: rgba(246, 243, 236, 0.4); }
.link-underline--light:hover { color: var(--wheat); border-color: var(--wheat); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(74, 21, 38, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(246, 243, 236, 0.12);
}
.site-header .wrap {
  padding-block: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 25px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); justify-content: flex-end; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 32px); }
.nav-links a {
  color: rgba(246, 243, 236, 0.76);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--cream); }
.nav-links a[aria-current="page"] { color: var(--cream); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(246, 243, 236, 0.22);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle .bars {
  position: relative;
  display: block;
  width: 17px; height: 1.6px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px; height: 1.6px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.nav-toggle .bars::before { top: -5.5px; }
.nav-toggle .bars::after  { top:  5.5px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(74, 21, 38, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(246, 243, 236, 0.12);
    padding: 6px var(--gutter) 18px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    border-top: 1px solid rgba(246, 243, 236, 0.1);
  }
}
@media (max-width: 460px) {
  .site-header .wrap { gap: 12px; }
  .btn--sm { padding: 10px 15px; font-size: 13.5px; }
  .brand img { height: 22px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(86vh, 840px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero__media,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  border: 0;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(74, 21, 38,0.5) 0%, rgba(74, 21, 38,0.3) 40%, rgba(74, 21, 38,0.93) 100%);
}
.hero .wrap {
  position: relative;
  padding-top: clamp(100px, 15vw, 170px);
  padding-bottom: clamp(48px, 6vw, 72px);
}
.hero .display { color: var(--cream); }
.hero__lead { margin: 24px 0 0; max-width: 54ch; }
.hero__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* Slimmer page-top banner for sub pages */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.page-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}
.page-hero .wrap {
  position: relative;
  padding-block: clamp(84px, 11vw, 150px);
}
.page-hero .h1 { color: var(--cream); }
.page-hero__lead { margin: 24px 0 0; max-width: 54ch; }

/* ---------- Feature columns ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(30px, 4vw, 56px);
}
.feature { display: flex; flex-direction: column; gap: 14px; }
.feature img { width: 42px; height: 42px; object-fit: contain; display: block; }
.feature p { margin: 0; font-size: 16.5px; line-height: 1.6; color: rgba(74, 21, 38, 0.72); }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 20px;
}
.card {
  background: var(--sand);
  border-radius: 20px;
  padding: clamp(28px, 3.2vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card img { width: 42px; height: 42px; object-fit: contain; display: block; }
.card p { margin: 0; font-size: 16.5px; line-height: 1.6; color: rgba(74, 21, 38, 0.72); }
.card__step { font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; color: rgba(74, 21, 38, 0.5); }
.card--dark { background: var(--ink); color: var(--cream); }
.card--dark img { filter: brightness(0) invert(1); }
.card--dark p { color: rgba(246, 243, 236, 0.75); }
.card--dark .card__step { color: rgba(246, 243, 236, 0.5); }

/* ---------- Stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.stat {
  background: var(--sand);
  border-radius: 20px;
  padding: clamp(26px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat img { width: 38px; height: 38px; object-fit: contain; display: block; }
.stat__value {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 54px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat__label { font-size: 16px; color: rgba(74, 21, 38, 0.7); }

/* ---------- Check list ---------- */

.checks { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.checks li { display: flex; gap: 13px; align-items: flex-start; font-size: 17px; line-height: 1.5; }
.checks .tick { color: var(--wheat); flex: 0 0 auto; }
ul.checks { list-style: none; margin: 0; padding: 0; }
ul.checks.is-light li { color: var(--cream); }
ul.checks.is-light.is-compact { gap: 13px; }
ul.checks.is-light.is-compact li { color: rgba(246, 243, 236, 0.9); }

/* ---------- Media + text ---------- */

.rounded-media { width: 100%; height: auto; display: block; border-radius: 20px; }

.divider-block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid rgba(74, 21, 38, 0.14);
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(28px, 4vw, 52px);
}
.rule-list > div { border-top: 1px solid rgba(74, 21, 38, 0.2); padding-top: 22px; }
.rule-list p { margin: 14px 0 0; font-size: 16.5px; line-height: 1.6; color: rgba(74, 21, 38, 0.72); }

/* ---------- Statement / CTA band ---------- */

.statement {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.statement__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.statement__inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(96px, 13vw, 180px) var(--gutter);
  text-align: center;
}
.statement h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--cream);
  text-wrap: balance;
}
.statement p {
  margin: 24px auto 0;
  max-width: 60ch;
  font-size: 17.5px;
  line-height: 1.6;
  color: rgba(246, 243, 236, 0.8);
}
.statement .btn { margin-top: 36px; }

/* ---------- Category tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tile {
  background: var(--sand);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  align-items: flex-end;
  min-height: 130px;
  font-family: var(--serif);
  font-size: 30px;
}
.tile--ink { background: var(--ink); color: var(--cream); }
.tile--terracotta { background: var(--terracotta); color: var(--cream-light); }

/* ---------- Forms ---------- */

.form-panel {
  background: var(--cream);
  border-radius: 24px;
  padding: clamp(26px, 3.2vw, 42px);
}
.form-panel h2, .form-panel h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.form-panel h3 { font-size: 19px; }
.form-panel__intro { margin: 12px 0 26px; font-size: 16px; line-height: 1.6; color: rgba(74, 21, 38, 0.7); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; }
.form input,
.form textarea {
  border: 1px solid rgba(74, 21, 38, 0.22);
  background: var(--field);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus,
.form textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(183, 96, 58, 0.14);
}
.form input:user-invalid,
.form textarea:user-invalid { border-color: #A4402C; }
.form .btn { margin-top: 8px; }
.form__note { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: rgba(74, 21, 38, 0.55); }

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-success {
  background: var(--ink);
  color: var(--cream);
  border-radius: 16px;
  padding: 24px;
  font-size: 16.5px;
  line-height: 1.55;
}
[hidden] { display: none !important; }

.form-error {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #A4402C;
  font-weight: 600;
}

.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- Catalog page ---------- */

.catalog { background: var(--ink); }
.catalog .wrap {
  padding-block: clamp(60px, 8vw, 110px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(38px, 5vw, 80px);
  align-items: start;
}
.catalog h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 78px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.catalog__tagline {
  margin: 24px 0 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  font-weight: 600;
  color: var(--wheat);
}
.catalog__body { margin: 14px 0 0; max-width: 50ch; font-size: 17px; line-height: 1.65; color: rgba(246, 243, 236, 0.78); }
.catalog__subtitle { margin: clamp(38px, 4.5vw, 56px) 0 20px; font-size: 19px; font-weight: 700; color: var(--cream); }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.contact__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.contact .wrap {
  position: relative;
  padding-block: clamp(72px, 9vw, 130px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.contact h1,
.contact h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.contact__lead { margin: 22px 0 0; max-width: 46ch; font-size: 17.5px; line-height: 1.6; color: rgba(246, 243, 236, 0.82); }
.contact__details {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
  font-size: 16.5px;
  color: rgba(246, 243, 236, 0.82);
}
.contact__details a { color: var(--wheat); }
.contact__details a:hover { color: var(--cream-light); }

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

.site-footer { background: var(--ink-deep); color: rgba(246, 243, 236, 0.72); }
.site-footer .wrap {
  padding-top: clamp(56px, 7vw, 92px);
  padding-bottom: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.site-footer__blurb { max-width: 44ch; }
.site-footer__blurb p { margin: 22px 0 0; font-size: 16px; line-height: 1.6; }
.site-footer img { height: 28px; width: auto; display: block; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col span.label,
.site-footer .label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 243, 236, 0.45);
}
.footer-col a, .footer-col span { font-size: 16px; }
.footer-col a { color: rgba(246, 243, 236, 0.8); }
.footer-col a:hover { color: var(--wheat); }
.site-footer__legal { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.site-footer__legal > div {
  border-top: 1px solid rgba(246, 243, 236, 0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(246, 243, 236, 0.5);
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  align-items: center;
  min-height: 60vh;
  background: var(--cream);
}
.notfound .wrap { padding-block: clamp(72px, 10vw, 140px); }

/* ---------- Motion preferences ---------- */

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