/* ==========================================================================
   Seiva - base layer: tokens, resets, motion, header, sections, hero
   ========================================================================== */

/* 1. Tokens ============================================================== */

:root {
  /* Motion tokens - one rhythm across the whole site */
  --seiva-dur-fast: 150ms;
  --seiva-dur: 240ms;
  --seiva-dur-slow: 620ms;
  --seiva-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Elevation - a fixed scale, no ad-hoc shadow values */
  --seiva-shadow-soft: 0 1px 2px rgba(2, 6, 23, 0.04), 0 2px 8px rgba(2, 6, 23, 0.06);
  --seiva-shadow-lifted: 0 2px 4px rgba(2, 6, 23, 0.05), 0 12px 28px rgba(2, 6, 23, 0.1);
  --seiva-shadow-deep: 0 4px 8px rgba(2, 6, 23, 0.06), 0 24px 48px rgba(2, 6, 23, 0.14);

  --seiva-radius: 12px;
  --seiva-radius-sm: 8px;
  --seiva-radius-lg: 20px;

  --seiva-header-h: 76px;

  /* Layered z-index scale */
  --seiva-z-sticky: 40;
  --seiva-z-header: 100;
  --seiva-z-overlay: 1000;
}

/* 2. Base ================================================================ */

html {
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header */
  scroll-padding-top: calc(var(--seiva-header-h) + 1rem);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
  height: auto;
}

/* Tabular figures so prices and spec columns never jitter */
.woocommerce-Price-amount,
.seiva-spec__value,
.seiva-price,
td.product-total,
td.product-subtotal,
.order-total .woocommerce-Price-amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Visible focus on every interactive element - never removed */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--wp--preset--color--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

a,
button,
summary,
label[for],
input[type="submit"],
.seiva-card--link {
  cursor: pointer;
}

/* Cut the 300ms tap delay on touch devices */
a,
button,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

.seiva-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--seiva-z-overlay);
  padding: 0.85rem 1.5rem;
  background: var(--wp--preset--color--navy);
  color: #fff;
  font-family: var(--wp--preset--font-family--rubik);
  font-weight: 600;
  border-radius: 0 0 var(--seiva-radius-sm) 0;
  text-decoration: none;
}
.seiva-skip-link:focus {
  left: 0;
}

/* 3. Motion ============================================================== */

/* Scroll reveal. Only transform + opacity animate - never layout properties. */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity var(--seiva-dur-slow) var(--seiva-ease-out),
    transform var(--seiva-dur-slow) var(--seiva-ease-out);
  transition-delay: calc(var(--seiva-stagger, 0) * 60ms);
  will-change: opacity, transform;
}
[data-reveal="left"] {
  transform: translate3d(-28px, 0, 0);
}
[data-reveal="right"] {
  transform: translate3d(28px, 0, 0);
}
[data-reveal="scale"] {
  transform: scale(0.96);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* If JS fails or is blocked, content must still render */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Press feedback - scale only, never a layout shift */
.wp-block-button__link,
.seiva-btn,
.button {
  transition:
    background-color var(--seiva-dur) var(--seiva-ease-out),
    color var(--seiva-dur) var(--seiva-ease-out),
    box-shadow var(--seiva-dur) var(--seiva-ease-out),
    transform var(--seiva-dur-fast) var(--seiva-ease-out);
}
.wp-block-button__link:active,
.seiva-btn:active,
.button:active {
  transform: scale(0.97);
}

/* Respect the user's motion preference */
@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;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 4. Header ============================================================== */

.seiva-header {
  position: sticky;
  top: 0;
  z-index: var(--seiva-z-header);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow var(--seiva-dur) var(--seiva-ease-out),
    border-color var(--seiva-dur) var(--seiva-ease-out);
}
.seiva-header.is-stuck {
  box-shadow: var(--seiva-shadow-soft);
  border-bottom-color: var(--wp--preset--color--line);
}

.seiva-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--seiva-header-h);
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.seiva-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--wp--preset--font-family--rubik);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--wp--preset--color--navy);
  text-decoration: none;
  white-space: nowrap;
}
.seiva-logo__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.seiva-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
}
.seiva-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  font-family: var(--wp--preset--font-family--rubik);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--wp--preset--color--navy);
  text-decoration: none;
  border-radius: var(--seiva-radius-sm);
  transition: color var(--seiva-dur) var(--seiva-ease-out);
}
/* Gold underline grows from the centre */
.seiva-nav__link::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 16px;
  height: 2px;
  background: var(--wp--preset--color--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--seiva-dur) var(--seiva-ease-out);
}
.seiva-nav__link:hover {
  color: var(--wp--preset--color--gold);
}
.seiva-nav__link:hover::after,
.seiva-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}
/* Current page marked by weight AND colour, not colour alone */
.seiva-nav__link[aria-current="page"] {
  color: var(--wp--preset--color--gold);
  font-weight: 600;
}

.seiva-header__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.seiva-iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--wp--preset--color--navy);
  border-radius: var(--seiva-radius-sm);
  text-decoration: none;
  transition:
    background-color var(--seiva-dur) var(--seiva-ease-out),
    color var(--seiva-dur) var(--seiva-ease-out);
}
.seiva-iconbtn:hover {
  background: var(--wp--preset--color--surface-alt);
  color: var(--wp--preset--color--gold);
}
.seiva-iconbtn svg {
  width: 22px;
  height: 22px;
}
.seiva-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--wp--preset--color--gold);
  color: #fff;
  font-family: var(--wp--preset--font-family--rubik);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.seiva-cart-count[data-count="0"] {
  display: none;
}

.seiva-burger {
  display: none;
}

@media (max-width: 900px) {
  .seiva-burger {
    display: inline-flex;
  }
  .seiva-nav {
    position: fixed;
    inset: var(--seiva-header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--seiva-header-h));
    overflow-y: auto;
    padding: 0.5rem clamp(1rem, 5vw, 2.5rem) 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--wp--preset--color--line);
    box-shadow: var(--seiva-shadow-lifted);
    transform: translate3d(0, -12px, 0);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity var(--seiva-dur) var(--seiva-ease-out),
      transform var(--seiva-dur) var(--seiva-ease-out),
      visibility 0s linear var(--seiva-dur);
  }
  .seiva-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  .seiva-nav__link {
    min-height: 52px;
    padding-inline: 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--wp--preset--color--line);
    border-radius: 0;
  }
  .seiva-nav__link::after {
    display: none;
  }
}

/* 5. Sections ============================================================ */

.seiva-section {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.seiva-section--tight {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.seiva-section--navy {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #1e3a8a 100%);
  color: #e2e8f0;
}
.seiva-section--alt {
  background: var(--wp--preset--color--surface-alt);
}

.seiva-wrap {
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}
.seiva-wrap--narrow {
  max-width: 760px;
}

.seiva-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-family: var(--wp--preset--font-family--rubik);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a4c05;
}
.seiva-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}
.seiva-section--navy .seiva-eyebrow {
  color: var(--wp--preset--color--gold-soft);
}

.seiva-title {
  margin: 0 0 1rem;
  font-family: var(--wp--preset--font-family--rubik);
  font-size: var(--wp--preset--font-size--xx-large);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--wp--preset--color--navy);
  text-wrap: balance;
}
.seiva-section--navy .seiva-title {
  color: #fff;
}

.seiva-lead {
  max-width: 62ch;
  margin: 0;
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.65;
  color: var(--wp--preset--color--ink-muted);
}
.seiva-section--navy .seiva-lead {
  color: #cbd5e1;
}

.seiva-section__head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.seiva-section__head--center {
  text-align: center;
}
.seiva-section__head--center .seiva-lead {
  margin-inline: auto;
}
.seiva-section__head--center .seiva-eyebrow::before {
  display: none;
}

/* Hero */
.seiva-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #1e3a8a 100%);
  color: #fff;
  padding-block: clamp(3.5rem, 9vw, 7rem);
}
.seiva-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 780px;
  max-height: 780px;
  background: radial-gradient(circle, rgba(224, 178, 82, 0.18) 0%, rgba(224, 178, 82, 0) 68%);
  pointer-events: none;
}
.seiva-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.seiva-hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--wp--preset--font-family--rubik);
  font-size: var(--wp--preset--font-size--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
}
.seiva-hero__title em {
  font-style: normal;
  color: var(--wp--preset--color--gold-soft);
}
.seiva-hero__lead {
  max-width: 52ch;
  margin: 0 0 2rem;
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.65;
  color: #cbd5e1;
}
.seiva-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.seiva-hero__media {
  position: relative;
  border-radius: var(--seiva-radius-lg);
  overflow: hidden;
  box-shadow: var(--seiva-shadow-deep);
  aspect-ratio: 4 / 5;
  background: #1e293b;
}
.seiva-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seiva-herostats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.seiva-herostat__value {
  display: block;
  font-family: var(--wp--preset--font-family--rubik);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wp--preset--color--gold-soft);
  line-height: 1.2;
}
.seiva-herostat__label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: #94a3b8;
}
