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

:root {
  --sage:       #7A9E7E;
  --sage-light: #A8C5A0;
  --sage-pale:  #EEF4EE;
  --sage-dark:  #4A6B4E;
  --cream:      #F7F4EF;
  --warm-sand:  #E8E0D5;
  --taupe:      #C4B5A5;
  --text:       #3A3A3A;
  --text-light: #6B6B6B;
  --white:      #FFFFFF;
  --error:      #C0614A;
}

html {
  scroll-behavior: smooth;
  /* Prevent horizontal page scroll globally.
     overflow: clip clips visually without creating a scroll boundary —
     child elements with overflow-x: auto continue to scroll independently. */
  overflow-x: clip;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--cream);
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

/* ── NAV ── */
nav {
  background: rgba(247, 244, 239, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--warm-sand);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo span {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--sage-dark);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.nav-links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--sage-dark); }

.nav-links a.nav-active {
  color: var(--sage-dark);
  text-decoration: underline;
  text-decoration-color: var(--sage-light);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.2s;
  padding: 0;
}

.nav-links button:hover { color: var(--error); }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--sage);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  text-align: center;
}

.btn:hover { background: var(--sage-dark); transform: translateY(-1px); }
.btn:disabled { background: var(--taupe); cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage);
}

.btn-ghost:hover { background: var(--sage-pale); }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--warm-sand);
  border-radius: 0.4rem;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

input:focus, textarea:focus { border-color: var(--sage); }

textarea { resize: vertical; line-height: 1.7; }

/* ── ALERTS ── */
.alert {
  padding: 0.9rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.alert-error { background: #FAF0EE; color: var(--error); border: 1px solid #E8C5BC; }
.alert-success { background: var(--sage-pale); color: var(--sage-dark); border: 1px solid var(--sage-light); }

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--warm-sand);
  border-radius: 0.75rem;
  padding: 2rem;
}

/* ── PAGE WRAPPER ── */
.page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.page-wide {
  min-height: calc(100vh - 64px);
  padding: 3rem 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

/* ── LOADING SPINNER ── */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--sage-pale);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

.loading-block {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.loading-block .spinner { margin-bottom: 1rem; }

/* ── SECTION LABEL ── */
.label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sage-dark);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.hamburger:hover { color: var(--sage); }

@media (max-width: 480px) {
  nav { padding: 0 1rem; }
  .nav-logo span { display: none; }
  .hamburger { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    background: rgba(247, 244, 239, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--warm-sand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.5rem;
    gap: 1.5rem;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  /* iOS zoom prevention — inputs must be ≥16px (1rem) to avoid auto-zoom on focus */
  input[type="email"],
  input[type="password"],
  input[type="text"],
  textarea { font-size: 1rem; padding: 0.9rem 1rem; }

  /* Comfortable button touch targets */
  .btn { padding: 1rem 2rem; font-size: 1rem; min-height: 48px; }

  /* Cards breathe more on small screens */
  .card { padding: 1.5rem; }

  /* Page wrappers */
  .page { padding: 2rem 1.25rem; }
  .page-wide { padding: 2rem 1.25rem; }

  /* Alert text slightly larger */
  .alert { font-size: 0.95rem; line-height: 1.6; }
}

/* ── FOOTER ── */
footer {
  background: #EDE8DF;
  color: var(--taupe);
  padding: 3rem 2rem 2.25rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  line-height: 1.9;
  border-top: 1px solid var(--warm-sand);
}

.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.footer-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
  letter-spacing: 0.01em;
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.6rem;
}

.footer-nav a {
  color: var(--taupe);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--sage-dark); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
}

.footer-social a {
  color: var(--taupe);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-social a:hover { color: var(--sage-dark); }

.footer-social svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
  display: block;
}

.footer-rule {
  width: 32px;
  height: 1px;
  background: var(--warm-sand);
}

.footer-contact {
  color: var(--taupe);
  font-size: 0.78rem;
  line-height: 1.85;
}

.footer-contact a {
  color: var(--taupe);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover { color: var(--sage-dark); }

.footer-copy {
  color: #C4B5A5;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  footer { padding: 2.5rem 1.5rem 2rem; }
  .footer-nav { gap: 0.4rem 1.25rem; }
  .footer-social { gap: 1.25rem; }
}
