/* ═══════════════════════════════════════════════════
   SADDLE — Heritage Tack Room Editorial
   Luxury equestrian catalog meets modern web craft
   ═══════════════════════════════════════════════════ */


/* ── Design Tokens ── */

:root {
  --cream-50: #FDFCF9;
  --cream-100: #F8F6F1;
  --cream-200: #F0EDE4;
  --cream-300: #E5E0D5;
  --cream-900: #1A1816;
  --brass: #D9952B;
  --brass-glow: rgba(217, 149, 43, 0.18);
  --brass-deep: #B87A1E;
  --cognac: #C47F40;
  --cognac-dark: #A86830;
  --dark: #2A2520;
  --dark-card: rgba(253, 252, 249, 0.035);
  --dark-border: rgba(229, 224, 213, 0.08);
  --warm-mid: #8E887D;
  --stitch: #C4B9A8;
  --serif: Georgia, 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ── Reset & Base ── */

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

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

body {
  font-family: var(--sans);
  color: var(--cream-900);
  background: var(--cream-50);
  line-height: 1.6;
  overflow-x: hidden;
}


/* ── Grain Overlay ── */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}


/* ── Selection ── */

::selection {
  background: rgba(217, 149, 43, 0.15);
  color: var(--cream-900);
}


/* ═══════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
  padding: 1rem 2.5rem;
  background: rgba(253, 252, 249, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(229, 224, 213, 0.5);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream-900);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-brand:hover {
  opacity: 0.7;
}

.nav-cta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-deep);
  text-decoration: none;
  padding: 0.55rem 1.4rem;
  border: 1.5px solid var(--brass);
  transition: all 0.35s var(--ease-out-expo);
}

.nav-cta:hover {
  background: var(--brass);
  color: var(--cream-50);
  box-shadow: 0 4px 16px var(--brass-glow);
}


/* ═══════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}


/* ── Decorative corner marks (print registration) ── */

.hero-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-corners span {
  position: absolute;
  width: 40px;
  height: 40px;
}

.hero-corners span::before,
.hero-corners span::after {
  content: '';
  position: absolute;
  background: var(--cream-300);
  opacity: 0.45;
}

.hero-corners span::before {
  width: 1px;
  height: 100%;
}

.hero-corners span::after {
  width: 100%;
  height: 1px;
}

.hero-corners .tl { top: 3.5rem; left: 2.5rem; }
.hero-corners .tl::before { left: 0; }
.hero-corners .tl::after { top: 0; }

.hero-corners .tr { top: 3.5rem; right: 2.5rem; }
.hero-corners .tr::before { right: 0; }
.hero-corners .tr::after { top: 0; }

.hero-corners .bl { bottom: 3.5rem; left: 2.5rem; }
.hero-corners .bl::before { left: 0; }
.hero-corners .bl::after { bottom: 0; }

.hero-corners .br { bottom: 3.5rem; right: 2.5rem; }
.hero-corners .br::before { right: 0; }
.hero-corners .br::after { bottom: 0; }


/* ── Snaffle Bit Rings ── */

.hero-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: 600px;
  height: 600px;
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  transform-origin: center;
}

.ring-1 {
  width: 360px;
  height: 360px;
  left: 22%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--brass);
  opacity: 0.055;
  animation: ringDrift1 90s linear infinite;
}

.ring-2 {
  width: 300px;
  height: 300px;
  left: 78%;
  transform: translate(-50%, -50%);
  border: 2.5px dashed var(--brass);
  opacity: 0.045;
  animation: ringDrift2 120s linear infinite;
}

.ring-3 {
  width: 440px;
  height: 440px;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--cognac);
  opacity: 0.03;
  animation: ringDrift3 150s linear infinite;
}

@keyframes ringDrift1 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringDrift2 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes ringDrift3 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}


/* ── Hero Content ── */

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  opacity: 0;
  animation: revealUp 0.9s var(--ease-out-expo) 0s forwards;
}

.hero-est {
  display: block;
  font-family: var(--serif);
  font-variant: small-caps;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--warm-mid);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: revealUp 0.9s var(--ease-out-expo) 0.15s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 14vw, 12rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 0.85;
  color: var(--cream-900);
  margin-bottom: 0.2em;
  text-shadow:
    0 2px 0 rgba(253, 252, 249, 0.6),
    0 -1px 1px rgba(26, 24, 22, 0.03);
  opacity: 0;
  animation: revealTitle 1s var(--ease-out-expo) 0.3s forwards;
}

.hero-rule {
  width: 72px;
  height: 1.5px;
  border: none;
  margin: 0 auto 1.75rem;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out-expo) 0.55s forwards;
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--warm-mid);
  margin-bottom: 3.5rem;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out-expo) 0.7s forwards;
}

.hero-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-50);
  background: var(--brass);
  text-decoration: none;
  padding: 1.05rem 2.8rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out-expo) 0.85s forwards;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.hero-cta:hover {
  background: var(--brass-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px var(--brass-glow);
}

.hero-cta:hover::before {
  transform: translateX(100%);
}

.hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(217, 149, 43, 0.12);
}


/* ── Scroll Indicator ── */

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeIn 0.6s ease 1.4s forwards;
}

.scroll-text {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stitch);
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--brass) 40%, transparent);
  animation: scrollPulse 2.5s ease-in-out 1.8s infinite;
  opacity: 0.6;
}


/* ═══════════════════════════════════════════════════
   Section Divider
   ═══════════════════════════════════════════════════ */

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--dark);
  height: 3rem;
  position: relative;
}

.divider-diamond {
  width: 7px;
  height: 7px;
  background: var(--brass);
  transform: rotate(45deg);
  position: relative;
  flex-shrink: 0;
}

.divider-line {
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--cognac-dark));
  opacity: 0.35;
}

.divider-line:last-child {
  background: linear-gradient(90deg, var(--cognac-dark), transparent);
}

.divider-diamond + .divider-line,
.divider-line + .divider-diamond {
  margin: 0 14px;
}


/* ═══════════════════════════════════════════════════
   Features — Dark "Tack Room" Section
   ═══════════════════════════════════════════════════ */

.features {
  background: var(--dark);
  padding: 5rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

/* Inset shadow for depth */
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
  pointer-events: none;
}

/* Subtle grain on dark */
.features::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.features-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  display: block;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.25rem;
}

.features-heading {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--cream-200);
  line-height: 1.15;
  margin-bottom: 4rem;
}


/* ── Feature Grid ── */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-item {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  padding: 2rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  /* Reveal animation */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo),
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              background 0.4s ease;
}

.feature-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-item:hover {
  background: rgba(253, 252, 249, 0.055);
  border-color: rgba(217, 149, 43, 0.18);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.feature-item.visible:hover {
  transform: translateY(-3px);
}

.feature-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--brass);
  opacity: 0.18;
  line-height: 1;
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  transition: opacity 0.4s ease;
}

.feature-item:hover .feature-num {
  opacity: 0.3;
}

.feature-accent {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--brass);
  margin-bottom: 1.25rem;
  transition: width 0.5s var(--ease-out-expo);
}

.feature-item:hover .feature-accent {
  width: 56px;
}

.feature-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream-200);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--warm-mid);
  line-height: 1.65;
  max-width: 380px;
}


/* ═══════════════════════════════════════════════════
   Signup Section
   ═══════════════════════════════════════════════════ */

.signup {
  padding: 6rem 2rem 7rem;
  background: var(--cream-100);
  position: relative;
  overflow: hidden;
}

/* Decorative ring echo */
.signup::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 2px solid var(--brass);
  opacity: 0.03;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  pointer-events: none;
}

.signup-inner {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.section-label--dark {
  color: var(--brass);
}

.signup-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--cream-900);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.signup-desc {
  color: var(--warm-mid);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 2.75rem;
}


/* ── Form ── */

.form {
  text-align: left;
}

.form-field {
  position: relative;
  margin-bottom: 1.15rem;
}

.form-input {
  width: 100%;
  padding: 1.15rem 1.1rem 0.65rem;
  font-size: 16px; /* Prevents iOS zoom */
  font-family: var(--sans);
  color: var(--cream-900);
  background: var(--cream-50);
  border: 1.5px solid var(--cream-300);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
  color: transparent;
}

.form-label {
  position: absolute;
  top: 0.95rem;
  left: 1.1rem;
  font-size: 0.95rem;
  color: var(--stitch);
  pointer-events: none;
  transition: all 0.25s var(--ease-out-expo);
  transform-origin: left;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
}

.form-input:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-glow);
}


/* ── Submit Button ── */

.form-submit {
  width: 100%;
  height: 52px;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-50);
  background: var(--brass);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-out-expo);
}

.form-submit:hover:not(:disabled) {
  background: var(--brass-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--brass-glow);
}

.form-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 149, 43, 0.1);
}

.form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-text { transition: opacity 0.2s ease; }
.btn-loading { display: none; }

.form-submit.loading .btn-text { opacity: 0; position: absolute; }
.form-submit.loading .btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(253, 252, 249, 0.25);
  border-top-color: var(--cream-50);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}


/* ── Form States ── */

.form-error {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  color: #8B3A3A;
  background: rgba(180, 60, 60, 0.06);
  border: 1px solid rgba(180, 60, 60, 0.12);
  text-align: center;
  display: none;
}

.form-error.show {
  display: block;
  animation: revealUp 0.3s var(--ease-out-expo);
}

.form-success {
  display: none;
  padding: 2rem 1rem;
  text-align: center;
}

.form-success.show {
  display: block;
  animation: revealUp 0.5s var(--ease-out-expo);
}

.success-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: scaleIn 0.5s var(--ease-out-back);
}

.success-ring .check {
  font-size: 1.5rem;
  color: var(--brass);
  line-height: 1;
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream-900);
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--warm-mid);
  font-size: 1rem;
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════ */

.footer {
  background: var(--dark);
  padding: 3.5rem 2rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream-200);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.footer-rule {
  width: 24px;
  height: 1.5px;
  background: var(--cognac-dark);
  border: none;
  margin: 1rem auto;
  opacity: 0.4;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--warm-mid);
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════════════
   Reveal Animations
   ═══════════════════════════════════════════════════ */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ═══════════════════════════════════════════════════
   Keyframes
   ═══════════════════════════════════════════════════ */

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealTitle {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
  50% { opacity: 0.7; transform: scaleY(1.2); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */

/* Tablet+ : staggered 2-column feature grid */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  /* Stagger right column down for asymmetry */
  .feature-item:nth-child(2n) {
    margin-top: 2.5rem;
  }

  .feature-desc {
    max-width: none;
  }
}

@media (min-width: 768px) {
  .features {
    padding: 6rem 3rem 7rem;
  }

  .signup {
    padding: 7rem 2rem 8rem;
  }

  .feature-item {
    padding: 2.25rem 2.25rem;
  }
}

/* Mobile adjustments */
@media (max-width: 639px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav.scrolled {
    padding: 0.8rem 1.5rem;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .hero-rings {
    width: 400px;
    height: 400px;
  }

  .ring-1 { width: 240px; height: 240px; }
  .ring-2 { width: 200px; height: 200px; }
  .ring-3 { width: 300px; height: 300px; }

  .hero-corners {
    display: none;
  }

  .features {
    padding: 4rem 1.5rem 5rem;
  }

  .features-heading {
    margin-bottom: 2.5rem;
  }

  .feature-num {
    font-size: 2.25rem;
    top: 1rem;
    right: 1.25rem;
  }

  .signup {
    padding: 4.5rem 1.5rem 5rem;
  }

  .signup::before {
    display: none;
  }

  .scroll-hint {
    display: none;
  }

  .section-divider {
    height: 2rem;
  }

  .divider-line {
    width: 36px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }

  .hero-rings {
    display: none;
  }
}
