/* ============================================
   LOTUS THEME — BASE STYLES
   Design tokens, reset, typography, globals
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Primary */
  --color-navy:        #0C1829;
  --color-navy-light:  #162240;
  --color-blue:        #1E3F6E;
  --color-blue-light:  #2B5EA7;

  /* Accent — bumped saturation/brightness for greater vibrancy */
  --color-saffron:     #F39014;
  --color-saffron-light: #FFAA3C;
  --color-saffron-dark:  #C66E0A;

  /* Neutrals */
  --color-white:       #FFFFFF;
  --color-gray-50:     #F7F5F2;
  --color-gray-100:    #EDE9E4;
  --color-gray-200:    #D8D2CA;
  --color-gray-300:    #B8B0A6;
  --color-gray-400:    #9B9389;
  --color-gray-600:    #6B6560;
  --color-gray-800:    #2E2A26;
  --color-gray-900:    #1A1714;

  /* Semantic */
  --color-text:        #1A1714;
  --color-text-muted:  #6B6560;
  --color-text-light:  #B8B0A6;
  --color-text-on-dark: #E8E4DF;
  --color-success:     #2F8F4E;
  --color-danger:      #C0392B;
  --color-bg:          #FFFFFF;
  --color-bg-alt:      #F7F5F2;
  --color-bg-dark:     #0C1829;
  --color-border:      #EDE9E4;

  /* Typography */
  --font-heading:      'Inter', system-ui, -apple-system, sans-serif;
  --font-body:         'Inter', system-ui, -apple-system, sans-serif;

  --text-xs:   clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm:   clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg:   clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl:   clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --text-2xl:  clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-3xl:  clamp(1.5rem, 1.25rem + 1.25vw, 1.875rem);
  --text-4xl:  clamp(1.75rem, 1.4rem + 1.75vw, 2.25rem);
  --text-5xl:  clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-6xl:  clamp(2.5rem, 1.75rem + 3.75vw, 3.75rem);
  --text-7xl:  clamp(3rem, 2rem + 5vw, 4.5rem);

  --leading-tight:    1.15;
  --leading-snug:     1.3;
  --leading-normal:   1.6;
  --leading-relaxed:  1.75;

  --tracking-tight:   -0.025em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;
  --tracking-wider:   0.1em;

  /* 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;

  /* Section Spacing */
  --section-padding: clamp(4rem, 6vw, 8rem);

  /* Layout */
  --container-max:    1280px;
  --container-wide:   1440px;
  --container-narrow: 768px;
  --gutter:           clamp(1rem, 3vw, 2rem);

  /* Transitions */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:  150ms;
  --duration-base:  300ms;
  --duration-slow:  500ms;
  --duration-slower: 800ms;

  /* Borders */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(12, 24, 41, 0.05);
  --shadow-md:  0 4px 12px rgba(12, 24, 41, 0.08);
  --shadow-lg:  0 8px 30px rgba(12, 24, 41, 0.12);
  --shadow-xl:  0 16px 50px rgba(12, 24, 41, 0.16);

  /* Header — includes iOS safe-area-inset-top so the header bleeds into
     the dynamic island area. On non-iOS / non-safe-area browsers the inset
     resolves to 0, so the values remain 80px / 64px as before. */
  --header-height: calc(80px + env(safe-area-inset-top, 0px));
  --header-height-scrolled: calc(64px + env(safe-area-inset-top, 0px));
}


/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* Global noise/grain texture — premium tactile feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-gray-900);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}


/* --- Typography --- */
h1 { font-size: var(--text-6xl); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: var(--text-5xl); font-weight: 800; letter-spacing: -0.035em; }
h3 { font-size: var(--text-4xl); letter-spacing: -0.03em; }
h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); font-weight: 600; }

/* Display utility — bigger than h1 */
.display {
  font-size: clamp(3.5rem, 2.5rem + 5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

/* Text shadow for headings on dark backgrounds */
.section--dark h1, .section--dark h2, .section--dark h3,
.section--navy h1, .section--navy h2, .section--navy h3 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }

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

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-xs);
  font-weight: 600;
}

.label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-saffron);
}

.label--light {
  color: var(--color-saffron-light);
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--color-saffron);
  color: var(--color-white);
  border-color: var(--color-saffron);
}

.btn--primary:hover {
  background-color: var(--color-saffron-dark);
  border-color: var(--color-saffron-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(224, 138, 44, 0.35);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--secondary:hover {
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-gray-200);
}

.btn--outline:hover {
  border-color: var(--color-navy);
  background-color: var(--color-gray-50);
}

.btn--lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: var(--space-2) var(--space-6);
  font-size: var(--text-xs);
}

.btn .btn-arrow {
  transition: transform var(--duration-base) var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}


/* --- Links --- */
.link {
  color: var(--color-blue-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.link:hover {
  color: var(--color-saffron);
}

.link--arrow::after {
  content: ' \2192';
  transition: transform var(--duration-base) var(--ease-out);
  display: inline-block;
}

.link--arrow:hover::after {
  transform: translateX(4px);
}


/* --- Global utility --- */
.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;
}

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