/* ============================================
   RTW Design System — LiveRTW.com
   "Meaning, Elegance, Cool"
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors — drawn from the necklace */
  --rtw-navy: #1a2744;
  --rtw-steel: #3d5a80;
  --rtw-sky: #89b4d4;
  --rtw-cream: #f5f0e8;
  --rtw-sand: #e8dfd0;
  --rtw-amber: #c67a3c;
  --rtw-rust: #a0522d;
  --rtw-white: #fafaf8;
  --rtw-silver: #b8b8b8;
  --rtw-black: #111111;
  --rtw-gold: #d4a54a;
  --rtw-teal: #4a8c8c;

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-accent: 'Montserrat', 'Arial', sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-wide: 1400px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-medium: 0.4s var(--ease-out);
  --transition-slow: 0.8s var(--ease-out);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--rtw-navy);
  background-color: var(--rtw-white);
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--rtw-navy);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
  margin-bottom: 1.5em;
  max-width: 65ch;
}

a {
  color: var(--rtw-steel);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--rtw-amber);
}

.accent-text {
  font-family: var(--font-accent);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.serif-italic {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
}

blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.4;
  color: var(--rtw-steel);
  border-left: 3px solid var(--rtw-amber);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--compact {
  padding: var(--space-xl) 0;
}

.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 40px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background-color: var(--rtw-amber);
  color: var(--rtw-white);
}

.btn--primary:hover {
  background-color: var(--rtw-rust);
  color: var(--rtw-white);
}

.btn--secondary {
  background-color: transparent;
  color: var(--rtw-navy);
  border: 1.5px solid var(--rtw-navy);
}

.btn--secondary:hover {
  background-color: var(--rtw-navy);
  color: var(--rtw-white);
}

.btn--white {
  background-color: var(--rtw-white);
  color: var(--rtw-navy);
}

.btn--white:hover {
  background-color: var(--rtw-cream);
  color: var(--rtw-navy);
}

.btn--ghost {
  background: transparent;
  color: var(--rtw-white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
  border-color: var(--rtw-white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--rtw-white);
}

/* --- Cards --- */
.card {
  background: var(--rtw-white);
  padding: var(--space-lg);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(26, 39, 68, 0.08);
}

.card--sand {
  background: var(--rtw-sand);
}

.card--cream {
  background: var(--rtw-cream);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

/* --- Visual Motifs --- */

/* Horizontal stripe divider (echoes necklace) */
.stripe-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--rtw-sky),
    var(--rtw-steel),
    var(--rtw-navy)
  );
  border: none;
  margin: var(--space-md) 0;
}

.stripe-divider--warm {
  background: linear-gradient(
    to right,
    var(--rtw-amber),
    var(--rtw-rust),
    var(--rtw-navy)
  );
}

.stripe-divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* Gradient backgrounds */
.bg-navy-gradient {
  background: linear-gradient(135deg, var(--rtw-navy) 0%, var(--rtw-steel) 100%);
  color: var(--rtw-white);
}

.bg-cream {
  background-color: var(--rtw-cream);
}

.bg-sand {
  background-color: var(--rtw-sand);
}

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

/* Subtle grain texture overlay */
.grain::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
}

/* Staggered children animation */
.stagger-children .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .fade-up:nth-child(6) { transition-delay: 0.5s; }
.stagger-children .fade-up:nth-child(7) { transition-delay: 0.6s; }
.stagger-children .fade-up:nth-child(8) { transition-delay: 0.7s; }

/* --- Form Elements --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 18px;
  border: 1.5px solid var(--rtw-silver);
  background: var(--rtw-white);
  color: var(--rtw-navy);
  width: 100%;
  transition: border-color var(--transition-fast);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--rtw-steel);
}

input::placeholder,
textarea::placeholder {
  color: var(--rtw-silver);
  font-family: var(--font-body);
}

label {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rtw-steel);
  display: block;
  margin-bottom: 8px;
}

/* --- Accordion --- */
.accordion-item {
  border-bottom: 1px solid rgba(26, 39, 68, 0.1);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--rtw-navy);
  text-align: left;
  transition: color var(--transition-fast);
}

.accordion-trigger:hover {
  color: var(--rtw-amber);
}

.accordion-trigger::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-fast);
}

.accordion-item.is-open .accordion-trigger::after {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.accordion-item.is-open .accordion-content {
  max-height: 500px;
}

.accordion-content-inner {
  padding-bottom: var(--space-md);
}

/* --- Image Treatments --- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Pre-Order Badge --- */
.preorder-badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--rtw-amber);
  color: var(--rtw-white);
  padding: 6px 16px;
}

/* --- Responsive Helpers --- */
@media (max-width: 768px) {
  :root {
    --space-2xl: 80px;
    --space-xl: 60px;
    --space-lg: 32px;
  }

  body {
    font-size: 1rem;
  }
}

/* --- Screen Reader Only --- */
.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;
}
