/* ============================================
   HEART OF SOUND INVITATION - DESIGN FOUNDATION
   Phase 1: Core Design System
   ============================================ */

/* ============================================
   1. COLOR VARIABLES
   ============================================ */
:root {
  /* Primary Colors */
  --color-background: #faf7f2;
  --color-heading: #c17a5b;
  --color-body: #090b09;
  --color-star: #f28d52;
  --color-button: #9baa98;
  --color-button-hover: #889987;
  --color-error: #d32f2f;
  --color-seashell: #fdf0e7;
}

/* ============================================
   2. FONT LOADING
   ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600&family=Source+Serif+Pro:wght@400&family=Roboto+Mono:wght@400;500&display=swap");

/* ============================================
   3. RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "Source Serif Pro", serif;
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-body);
  background-color: var(--color-background);
  overflow: hidden; /* Disable all scrolling - navigation is horizontal only */
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ============================================
   4. TYPOGRAPHY SYSTEM
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.2;
}

/* Fluid Typography with clamp() */
h1 {
  font-size: clamp(2.5rem, 5vw + 1.5rem, 5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw + 0.75rem, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2rem);
}

h4 {
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.5rem);
}

p {
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
  margin-bottom: 1em;
}

/* ============================================
   5. LAYOUT UTILITIES
   ============================================ */

/* Full-height sections with fallback */
.section {
  height: 100vh; /* Fallback */
  height: 100dvh;
  width: 100vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Centered content container */
.centered-content {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.index-tagline {
  font-family: "Roboto Mono", monospace;
  font-weight: 400;
  font-size: clamp(0.75rem, 1vw + 0.3rem, 0.875rem);
  letter-spacing: 0.2em;
  color: var(--color-body);
  margin-bottom: 3rem;
  margin-top: 1rem;
}

/* Horizontal scroll container */
.scroll-container {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; /* Mobile Safari bounce prevention */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.scroll-container > .section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  flex-shrink: 0;
}

/* ============================================
   6. COMPONENT STYLES
   ============================================ */

/* Buttons */
button,
.button {
  font-family: "Roboto Mono", monospace;
  font-weight: 500;
  font-size: clamp(0.875rem, 1vw + 0.5rem, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-button);
  color: var(--color-body);
  border: none;
  border-radius: 0; /* Sharp corners */
  padding: 1rem 2rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 48px; /* Touch-friendly */
  min-width: 48px;
}

button:hover,
.button:hover {
  background-color: var(--color-button-hover);
}

button:active,
.button:active {
  transform: translateY(1px);
}

button:disabled,
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: "Source Serif Pro", serif;
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
  color: var(--color-body);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-body);
  border-radius: 0;
  padding: 0.5rem 0;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
  min-height: 48px; /* Touch-friendly */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-bottom-color: var(--color-heading);
}

input.error,
textarea.error {
  border-bottom-color: var(--color-error);
}

form.error {
  animation: shake 0.4s ease-in-out;
}

/* Fade Gradient for Scrollable Content */
.fade-gradient {
  position: relative;
}

.fade-gradient::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--color-background));
  pointer-events: none;
  opacity: 0.7;
}

/* ============================================
   7. ANIMATIONS
   ============================================ */

/* Typewriter Cursor Blink */
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--color-heading);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}

/* Error Shake Animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Smooth Hover Transitions */
a,
button,
input,
.interactive {
  transition: all 0.2s ease;
}

/* ============================================
   8. RESPONSIVE DESIGN
   ============================================ */

/* Mobile First - Base styles above are for mobile */

/* Tablet breakpoint */
@media (min-width: 768px) {
  .centered-content {
    width: 80%;
    padding: 3rem 2rem;
  }
}

/* Desktop breakpoint */
@media (min-width: 1024px) {
  .centered-content {
    width: 600px;
    padding: 4rem 2rem;
  }
}

/* Large desktop breakpoint */
@media (min-width: 1440px) {
  .centered-content {
    max-width: 600px;
  }
}

/* ============================================
   9. UTILITY CLASSES
   ============================================ */

/* Text Alignment */
.text-center {
  text-align: center;
}

/* ============================================
   10. PRINT STYLES
   ============================================ */
@media print {
  .section {
    height: auto;
    page-break-inside: avoid;
  }
}
