/* ========================================
   Grace Journal Landing Page
   Mobile-first responsive design
   ======================================== */

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

:root {
  --brown: #5D4037;
  --brown-dark: #3E2723;
  --brown-light: #8D6E63;
  --gold: #F5A623;
  --gold-hover: #E09900;
  --cream: #FFFDF5;
  --warm-bg: #FFF8E7;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E0E0E0;
  --gray-500: #9E9E9E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(93, 64, 55, 0.08);
  --shadow-md: 0 4px 20px rgba(93, 64, 55, 0.12);
  --shadow-lg: 0 8px 40px rgba(93, 64, 55, 0.16);
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --container: 1000px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--brown-dark);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Section Titles --- */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--brown-light);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--brown-dark);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--brown);
  border-color: var(--brown);
}

.btn-secondary:hover {
  background: var(--brown);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-icon {
  flex-shrink: 0;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 253, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(93, 64, 55, 0.08);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  border-radius: 8px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brown-dark);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brown);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--gold-hover);
}

.nav-cta {
  background: var(--gold);
  color: var(--brown-dark) !important;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--gold-hover);
}

/* --- Hamburger (hidden on desktop) --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  padding: 100px 0 60px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--warm-bg) 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-content {
  text-align: center;
  max-width: 600px;
}

.hero-badge {
  margin-bottom: 20px;
}

.hero-icon {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brown-dark);
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--brown-light);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.hero-phone {
  flex-shrink: 0;
}

/* --- Phone Frame --- */
.phone-frame {
  position: relative;
  width: 280px;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.1);
}

/* No fake notch — screenshots already include the status bar */

.phone-screen {
  border-radius: 24px;
  width: 100%;
  height: auto;
}

.phone-frame-sm {
  width: 220px;
  border-radius: 30px;
  padding: 10px;
}

.phone-frame-sm img {
  border-radius: 20px;
}

/* --- Features --- */
.features {
  padding: 80px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--cream);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(93, 64, 55, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warm-bg);
  border-radius: var(--radius-md);
  color: var(--brown);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--brown-dark);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--brown-light);
  line-height: 1.6;
}

/* --- Screenshots --- */
.screenshots {
  padding: 80px 0;
  background: var(--warm-bg);
  overflow: hidden;
}

.screenshots-track {
  display: flex;
  gap: 24px;
  padding: 0 20px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshots-track::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-label {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- How It Works --- */
.how-it-works {
  padding: 80px 0;
  background: var(--white);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--brown-dark);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--brown-light);
  font-size: 0.95rem;
  max-width: 320px;
  margin: 0 auto;
}

.step-divider {
  display: none;
}

/* --- Reviews --- */
.reviews {
  padding: 80px 0;
  background: var(--warm-bg);
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.review-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}

.review-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brown-dark);
  margin-bottom: 12px;
  font-style: italic;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
}

/* --- FAQ --- */
.faq-section {
  padding: 80px 0;
  background: var(--white);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:first-child {
  border-top: 1px solid var(--gray-200);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brown-dark);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] .faq-question::after {
  content: '\2212';
}

.faq-answer {
  padding: 0 4px 20px;
}

.faq-answer p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--brown);
}

.faq-answer a {
  color: var(--gold-hover);
  text-decoration: underline;
}

.faq-answer a:hover {
  color: var(--brown-dark);
}

@media (min-width: 768px) {
  .faq-question {
    font-size: 1.2rem;
    padding: 24px 4px;
  }
}

/* --- Beta Signup --- */
.beta-signup {
  padding: 80px 0;
  background: var(--cream);
}

.beta-card {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  overflow: hidden;
  position: relative;
}

.beta-content {
  text-align: center;
  max-width: 480px;
}

.beta-content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.beta-content p {
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 8px;
}

.beta-note {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  opacity: 1 !important;
  margin-bottom: 24px !important;
}

.waitlist-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.form-row input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.form-row input[type="email"]:focus {
  border-color: var(--gold);
}

.btn-submit {
  position: relative;
  width: 100%;
}

.btn-submit .btn-loading {
  display: none;
  animation: spin 1s linear infinite;
}

.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline-flex; }

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

.form-message {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.4em;
}

.form-message.success { color: #81C784; }
.form-message.error { color: #EF9A9A; }
.form-message.info { color: var(--gold); }

.beta-visual {
  flex-shrink: 0;
}

/* --- Footer --- */
.site-footer {
  padding: 40px 0 24px;
  background: var(--brown-dark);
  color: rgba(255,255,255,0.7);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  border-radius: 10px;
}

.footer-brand strong {
  display: block;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.footer-brand span {
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.coming-soon-badge {
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========================================
   MOBILE (small screens)
   ======================================== */
@media (max-width: 599px) {
  .hamburger {
    display: flex;
  }

  .header-inner {
    height: 52px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  /* Hide nav links, show only Join Beta inline */
  .header-nav {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 253, 245, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .header-nav.open {
    max-height: 200px;
    padding: 8px 0;
  }

  .header-nav .nav-link {
    display: block;
    padding: 12px 24px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(93, 64, 55, 0.06);
  }

  .header-nav .nav-link:last-of-type {
    border-bottom: none;
  }

  .header-nav .nav-cta {
    display: block;
    margin: 8px 16px 4px;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }

  /* Footer mobile */
  .footer-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .footer-brand strong {
    font-size: 0.95rem;
  }

  .footer-brand span {
    font-size: 0.8rem;
  }

  .footer-copy {
    margin-top: 8px;
  }
}

/* ========================================
   TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .header-nav {
    gap: 24px;
  }

  .header-nav a {
    font-size: 0.9rem;
  }

  .nav-cta {
    padding: 8px 18px;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .hero-content {
    text-align: left;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-ctas {
    flex-direction: row;
    justify-content: flex-start;
  }

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

  .form-row {
    flex-direction: row;
  }

  .form-row input[type="email"] {
    flex: 1;
  }

  .btn-submit {
    width: auto;
    min-width: 160px;
  }

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

  .beta-card {
    flex-direction: row;
    text-align: left;
    padding: 56px 48px;
  }

  .beta-content {
    text-align: left;
  }

  .waitlist-form {
    margin: 0;
  }

  .steps {
    flex-direction: row;
    align-items: flex-start;
  }

  .step-divider {
    display: block;
    flex-shrink: 0;
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin-top: 55px;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
  }

  .footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-sub {
    font-size: 1.15rem;
  }

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

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

  .screenshots-track {
    justify-content: center;
    overflow-x: visible;
    padding: 0 32px 20px;
    flex-wrap: nowrap;
  }

  .phone-frame {
    width: 300px;
  }
}

/* ========================================
   Large Desktop (1200px+) - max widths
   ======================================== */
@media (min-width: 1200px) {
  .hero-content {
    max-width: 540px;
  }
}