/* ==========================================================================
   Sigma Taurus — main.css
   Design tokens, reset, layout primitives, and shared components
   (header, footer, buttons, section furniture).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   Colours sampled directly from the existing site's screenshots.
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-teal: #00a7a7;
  --color-teal-dark: #018f8f;
  --color-teal-darker: #017373;
  --color-mint: #e7f2f3;
  --color-mint-deep: #e2edee;
  --color-ink: #1d2327;
  --color-white: #ffffff;

  /* Text */
  --color-text: #1d2327;
  --color-text-muted: #5b6669;
  --color-text-invert: #ffffff;
  --color-text-invert-muted: rgba(255, 255, 255, 0.78);

  /* Lines & shadows */
  --color-border: #d5e3e5;
  --shadow-card: 0 2px 18px rgba(29, 35, 39, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(29, 35, 39, 0.12);

  /* Typography */
  --font-body: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);

  /* Fluid type scale */
  --fs-eyebrow: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: 1rem;
  --fs-lead: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.8vw, 3.75rem);
  --fs-display: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-y: clamp(3rem, 2rem + 5vw, 6.5rem);

  /* Layout */
  --container-max: 1180px;
  --container-pad: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);

  /* Shape & motion */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --transition: 180ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-mint);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-teal-darker);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

ul,
ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Visible focus for every interactive element — never remove without replacing. */
:focus-visible {
  outline: 3px solid var(--color-teal-darker);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

/* Keyboard-only skip link. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 100;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-teal-darker);
  color: var(--color-text-invert);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------------------
   4. Section furniture
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--section-y);
}

.section--mint {
  background-color: var(--color-mint);
}

.section--white {
  background-color: var(--color-white);
}

.section__eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

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

.section__title {
  font-size: var(--fs-h2);
  max-width: 22ch;
}

.section__lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background-color: var(--color-teal);
  border-color: var(--color-teal);
  color: var(--color-text-invert);
}

.btn--primary:hover {
  background-color: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
}

.btn--on-teal {
  background-color: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-teal-darker);
}

.btn--on-teal:hover {
  background-color: var(--color-mint);
  border-color: var(--color-mint);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--color-teal);
  color: var(--color-teal-darker);
}

.btn--ghost:hover {
  background-color: var(--color-teal);
  color: var(--color-text-invert);
}

/* --------------------------------------------------------------------------
   6. Site header
   NOTE: the header markup is byte-for-byte identical on every page, so the
   "current page" highlight cannot be hard-coded per page. js/main.js adds
   .site-nav__link--active by matching the URL. Without JS the nav still works
   and reads correctly — it just loses the highlight.
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--color-mint);
  padding-block: var(--space-lg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text);
}

.site-header__logo {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.site-header__name {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Mobile menu button — hidden once the nav fits inline. */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: currentColor;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 0.5rem + 1.6vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding-block: var(--space-2xs);
  transition: color var(--transition);
}

.site-nav__link:hover {
  color: var(--color-teal-darker);
}

.site-nav__link--active {
  color: var(--color-teal);
}

/* Mobile: nav collapses behind the toggle.
   .site-nav is hidden only when JS has marked it collapsed, so a no-JS
   visitor always sees the full nav list. */
@media (max-width: 819px) {
  .site-nav[data-collapsed="true"] {
    display: none;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav {
    flex-basis: 100%;
    padding-top: var(--space-md);
  }

  .site-nav__list {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (min-width: 820px) {
  .nav-toggle {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   7. Site footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-mint);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-xl);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__link {
  font-size: var(--fs-small);
  color: var(--color-text);
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--color-teal-darker);
  text-decoration: underline;
}

.site-footer__copyright {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.site-footer__top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-teal);
  color: var(--color-text-invert);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1;
  transition: background-color var(--transition);
}

.site-footer__top:hover {
  background-color: var(--color-teal-dark);
}

/* --------------------------------------------------------------------------
   8. Page hero — the mint intro band used on every page except Home
   -------------------------------------------------------------------------- */
.page-hero {
  background-color: var(--color-mint);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem);
}

.page-hero__title {
  font-size: var(--fs-h1);
  max-width: 18ch;
  margin-bottom: 0;
}

.page-hero__text {
  margin-top: var(--space-lg);
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  max-width: 58ch;
}

/* Breadcrumb, used on product detail pages. */
.breadcrumb {
  margin-bottom: var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-xs);
  color: var(--color-border);
}

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

.breadcrumb__link:hover {
  color: var(--color-teal-darker);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Closing CTA band — dark photo background, repeated on every page
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  background-color: var(--color-ink);
  background-image: url("../assets/img/feed-3.jpg");
  background-size: cover;
  background-position: center;
  isolation: isolate;
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(15, 20, 22, 0.8);
  z-index: -1;
}

.cta-band__title {
  color: var(--color-text-invert);
  font-size: var(--fs-h2);
  max-width: 20ch;
  margin-inline: auto;
}

.cta-band__text {
  color: var(--color-text-invert-muted);
  margin-bottom: var(--space-xl);
  max-width: 56ch;
  margin-inline: auto;
}
