/* ============================================================
   STEDWYN — main.css
   Global reset, typography, layout, components
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --midnight:  #111318;
  --slate:     #1E2430;
  --coral:     #C94E30;
  --peach:     #F0997B;
  --muted:     #8A9AAA;
  --white:     #FFFFFF;

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--midnight);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  touch-action: manipulation;
}

/* ---------- Typography ---------- */
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  font-size: 1.25rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
}

/* ---------- NAV ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  padding: 28px 48px;
  background: linear-gradient(
    to bottom,
    rgba(17, 19, 24, 0.96) 0%,
    rgba(17, 19, 24, 0.0) 100%
  );
  pointer-events: none;
}

.site-nav .wordmark {
  pointer-events: all;
  display: inline-block;
  font-size: 1.15rem;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background-color: var(--midnight);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 48px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.footer-links a,
.footer-links button {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--white);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 14px 32px;
  transition: background 0.22s ease, color 0.22s ease, opacity 0.22s ease, transform 0.18s ease;
  white-space: nowrap;
  will-change: transform, opacity;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-coral {
  background: var(--coral);
  color: var(--white);
  border: 2px solid var(--coral);
}

.btn-coral:hover {
  background: #b8422a;
  border-color: #b8422a;
}

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

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

.btn-white-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-white-outline:hover {
  background: var(--white);
  color: var(--coral);
}

/* ---------- CONTACT MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--slate);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 52px 48px;
  max-width: 520px;
  width: 100%;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.36s var(--ease-out-expo);
}

.modal-overlay.is-open .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 1.5rem;
  color: var(--coral);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: opacity 0.2s ease;
}

.modal-close:hover {
  opacity: 0.7;
}

.modal-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--white);
}

.modal-body {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.modal-email {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--coral);
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease;
}

.modal-email:hover {
  opacity: 0.8;
}

/* ---------- PAGE TRANSITION ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- SECTION PADDING ---------- */
.section-pad {
  padding: 100px 48px;
}

/* ---------- TICKER ---------- */
.ticker-section {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  padding: 18px 0;
  background: var(--midnight);
  white-space: nowrap;
  position: relative;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: ticker-scroll 32s linear infinite;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 28px;
}

.ticker-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- GENERAL UTILITY ---------- */
.text-coral  { color: var(--coral); }
.text-muted  { color: var(--muted); }
.text-peach  { color: var(--peach); }

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

/* ---------- ABOUT PAGE ---------- */
.about-hero-quote {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--coral);
  max-width: 820px;
  margin: 0 auto 80px;
  line-height: 1.25;
  padding-top: 140px;
}

.about-prose {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px 120px;
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 80px;
}

.about-columns p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.8);
}

.about-bold-statement {
  grid-column: 1 / -1;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.2;
  color: var(--white);
  border-left: 3px solid var(--coral);
  padding-left: 28px;
  margin: 20px 0;
}

.about-cta {
  margin-top: 64px;
  text-align: center;
}

/* ---------- LEGAL PAGES ---------- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 140px 48px 120px;
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.legal-page .legal-date {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 56px;
  display: block;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 48px;
  margin-bottom: 14px;
  color: var(--white);
}

.legal-page p,
.legal-page li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.legal-page ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-page a {
  color: var(--coral);
  text-decoration: underline;
}

/* ---------- SCROLL HINT ---------- */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  will-change: opacity;
}

.scroll-hint-text {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  animation: bounce-arrow 1.6s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(6px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet ≤ 1024px ---- */
@media (max-width: 1024px) {
  .about-columns {
    gap: 40px 56px;
  }

  .site-footer {
    padding: 40px 32px;
  }
}

/* ---- Mobile ≤ 768px ---- */
@media (max-width: 768px) {
  .site-nav {
    padding: 18px 20px;
  }

  .site-nav .wordmark {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .section-pad {
    padding: 56px 20px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 20px;
    gap: 24px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    width: 100%;
  }

  .footer-links a,
  .footer-links button {
    font-size: 0.8125rem;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-card {
    padding: 36px 24px;
    max-width: 100%;
  }

  .modal-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .modal-body {
    font-size: 0.875rem;
    margin-bottom: 20px;
  }

  .modal-email {
    font-size: 1.0625rem;
    word-break: break-all;
  }

  .about-hero-quote {
    padding-top: 90px;
    margin-bottom: 48px;
    font-size: clamp(1.35rem, 5vw, 2rem);
  }

  .about-prose {
    padding: 0 20px 72px;
  }

  .about-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-bold-statement {
    grid-column: 1 / -1;
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    padding-left: 20px;
  }

  .about-cta {
    margin-top: 48px;
  }

  .legal-page {
    padding: 100px 20px 72px;
  }

  .legal-page h2 {
    font-size: 1.125rem;
    margin-top: 36px;
  }

  .scroll-hint {
    bottom: 24px;
  }

  .ticker-item {
    padding: 0 20px;
  }
}

/* ---- Small phone ≤ 480px ---- */
@media (max-width: 480px) {
  .site-nav {
    padding: 14px 16px;
  }

  .site-nav .wordmark {
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
  }

  .section-pad {
    padding: 44px 16px;
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.875rem;
  }

  .site-footer {
    padding: 28px 16px;
  }

  .footer-links {
    gap: 12px 16px;
  }

  .footer-links a,
  .footer-links button {
    font-size: 0.75rem;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    padding: 28px 18px;
  }

  .modal-title {
    font-size: 1.375rem;
  }

  .modal-body {
    font-size: 0.8125rem;
  }

  .modal-email {
    font-size: 0.9375rem;
  }

  .about-hero-quote {
    padding-top: 80px;
    margin-bottom: 32px;
  }

  .about-prose {
    padding: 0 16px 56px;
  }

  .about-bold-statement {
    padding-left: 16px;
  }

  .legal-page {
    padding: 88px 16px 56px;
  }

  .ticker-item {
    padding: 0 16px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }
}

/* ---- Landscape mobile: very short viewport ---- */
@media (max-height: 500px) and (orientation: landscape) {
  .site-nav {
    padding: 10px 20px;
  }

  .scroll-hint {
    display: none;
  }

  .modal-overlay {
    align-items: flex-start;
    padding-top: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
