/* style.css — Gigital design system */

/* ============ FONTS ============ */
/* Clash Grotesk (display) + Satoshi (body) via Fontshare */

/* ============ TYPE SCALE ============ */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.5vw, 7rem);

  /* ============ SPACING ============ */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ============ RADIUS ============ */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* ============ TRANSITIONS ============ */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ============ CONTENT WIDTHS ============ */
  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* ============ FONTS ============ */
  --font-display: 'Clash Grotesk', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============ LIGHT MODE (default) ============ */
:root,
[data-theme='light'] {
  /* Surfaces — warm off-white, cool-neutral undertone */
  --color-bg: #f6f7f2;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcf8;
  --color-surface-offset: #eef0e7;
  --color-surface-offset-2: #e6e9dc;
  --color-surface-dynamic: #dde1d0;
  --color-divider: #dcdfd2;
  --color-border: #cdd2bf;

  /* Text */
  --color-text: #10120c;
  --color-text-muted: #52564a;
  --color-text-faint: #93997f;
  --color-text-inverse: #f6f7f2;

  /* Primary — deep readable olive-lime (buttons/links use var(--color-text-inverse) on top) */
  --color-primary: #56720a;
  --color-primary-hover: #44590a;
  --color-primary-active: #354608;
  --color-primary-highlight: #e7f0c6;

  /* Vivid accent — punchy lime for CTA fills, badges, underlines (pairs with dark text) */
  --color-accent: #c6e62d;
  --color-accent-hover: #b4d31f;
  --color-accent-text: #10120c;

  /* Status */
  --color-error: #b33a2e;
  --color-error-highlight: #f1d9d5;
  --color-warning: #a6660a;
  --color-warning-highlight: #ecdcc0;
  --color-success: #3f7a1f;
  --color-success-highlight: #dbe8c9;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 120 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 120 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 120 / 0.14);
}

/* ============ DARK MODE ============ */
[data-theme='dark'] {
  --color-bg: #0a0b08;
  --color-surface: #12140e;
  --color-surface-2: #161810;
  --color-surface-offset: #1a1c13;
  --color-surface-offset-2: #202216;
  --color-surface-dynamic: #282b1a;
  --color-divider: #23261a;
  --color-border: #34381f;

  --color-text: #eceee1;
  --color-text-muted: #9aa087;
  --color-text-faint: #656b53;
  --color-text-inverse: #0a0b08;

  --color-primary: #c6e62d;
  --color-primary-hover: #d8f159;
  --color-primary-active: #aecb1e;
  --color-primary-highlight: #262b13;

  --color-accent: #c6e62d;
  --color-accent-hover: #d8f159;
  --color-accent-text: #0a0b08;

  --color-error: #ff8a72;
  --color-error-highlight: #3a2018;
  --color-warning: #ffbb5c;
  --color-warning-highlight: #3a2c12;
  --color-success: #9ed46a;
  --color-success-highlight: #1f2b14;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 20px 50px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg: #0a0b08;
    --color-surface: #12140e;
    --color-surface-2: #161810;
    --color-surface-offset: #1a1c13;
    --color-surface-offset-2: #202216;
    --color-surface-dynamic: #282b1a;
    --color-divider: #23261a;
    --color-border: #34381f;
    --color-text: #eceee1;
    --color-text-muted: #9aa087;
    --color-text-faint: #656b53;
    --color-text-inverse: #0a0b08;
    --color-primary: #c6e62d;
    --color-primary-hover: #d8f159;
    --color-primary-active: #aecb1e;
    --color-primary-highlight: #262b13;
    --color-accent: #c6e62d;
    --color-accent-hover: #d8f159;
    --color-accent-text: #0a0b08;
    --color-error: #ff8a72;
    --color-error-highlight: #3a2018;
    --color-warning: #ffbb5c;
    --color-warning-highlight: #3a2c12;
    --color-success: #9ed46a;
    --color-success-highlight: #1f2b14;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.45);
    --shadow-lg: 0 20px 50px oklch(0 0 0 / 0.55);
  }
}

body {
  background-color: var(--color-bg);
  transition:
    background-color var(--transition-interactive),
    color var(--transition-interactive);
}

/* ============ GRAIN TEXTURE OVERLAY (focal areas) ============ */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ TYPOGRAPHY ============ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  flex-shrink: 0;
}

.h-hero {
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.03;
}
.h-display {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.06;
}
.h-title {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.12;
}
.h-sub {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
  font-family: var(--font-body);
}
.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 42ch;
}
.body-copy {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 62ch;
}
.text-accent {
  color: var(--color-primary);
}
mark {
  background: none;
  color: var(--color-text);
  background-image: linear-gradient(
    to top,
    color-mix(in oklab, var(--color-accent) 55%, transparent) 38%,
    transparent 38%
  );
  padding-inline: 0.05em;
}

/* ============ LAYOUT ============ */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
  position: relative;
}
.section-tight {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}
@media (max-width: 640px) {
  .container,
  .container-wide,
  .container-narrow {
    padding-inline: var(--space-4);
  }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  white-space: nowrap;
  min-height: 44px;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-text);
  background: var(--color-surface-offset);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding-inline: var(--space-3);
}
.btn-ghost:hover {
  color: var(--color-text);
}
.btn-block {
  width: 100%;
}

/* ============ NAV ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  transition: background var(--transition-interactive);
}
.header--hidden {
  transform: translateY(-100%);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo svg {
  color: var(--color-primary);
  width: 32px;
  height: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--color-text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1080px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    background: var(--color-bg);
    padding: var(--space-6) var(--space-5);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: var(--text-lg);
    padding: var(--space-4) 0;
    width: 100%;
    border-bottom: 1px solid var(--color-divider);
    color: var(--color-text);
  }
  .nav-links .btn {
    margin-top: var(--space-4);
    width: 100%;
    min-width: 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-16) var(--space-10);
  background: var(--color-surface-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  margin-bottom: var(--space-3);
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }
}

/* ============ RESPONSIVE GRID (any inline grid layout) ============ */
@media (max-width: 800px) {
  .responsive-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============ CARDS ============ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.card-flat {
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

/* ============ BADGES / CHIPS ============ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ============ FORMS ============ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.field input,
.field select,
.field textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  min-height: 44px;
}
.field textarea {
  min-height: 128px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1em;
}
@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ============ UTILITIES ============ */
.flow > * + * {
  margin-top: var(--space-4);
}
.stack-8 > * + * {
  margin-top: var(--space-8);
}
.divider {
  height: 1px;
  background: var(--color-divider);
  border: none;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 100;
  font-size: var(--text-sm);
  font-weight: 600;
}
.skip-link:focus {
  left: var(--space-2);
}

/* ============ REVEAL ANIMATION ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ============ STICKY BOOKING BUTTON ============ */
.sticky-book {
  position: fixed;
  right: clamp(var(--space-4), 3vw, var(--space-8));
  bottom: clamp(var(--space-4), 3vw, var(--space-8));
  z-index: 60;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.22));
  padding: var(--space-3) var(--space-5);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, background 180ms ease;
}
.sticky-book.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-book .sticky-book__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
@media (max-width: 640px) {
  .sticky-book {
    left: var(--space-4);
    right: var(--space-4);
    bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-book { transition: none; }
}
@media print {
  .sticky-book { display: none; }
}
