/* FliteWallet — Vintage · warm editorial */

:root {
  --bg-deep: #f2ede3;
  --bg-sky-mid: #ede6d8;
  --bg-surface: rgba(255, 255, 255, 0.65);
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --border: rgba(180, 148, 100, 0.30);
  --text: #2a1f0f;
  --text-muted: #7a6a55;
  --accent: #ffd100;
  --accent-soft: rgba(255, 209, 0, 0.22);
  --accent-hover: #e8be00;
  --on-accent: #1a1200;
  --accent2: #6aaacf;
  --accent2-soft: rgba(106, 170, 207, 0.18);
  --accent3: #c4a882;
  --shadow-soft: 0 4px 24px rgba(80, 55, 20, 0.10);
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
}

/* Warm parchment background — chart paper feel */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 75% 50% at 15% 15%, rgba(226, 231, 75, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 65%, rgba(164, 200, 225, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 90%, rgba(210, 180, 140, 0.10) 0%, transparent 50%),
    linear-gradient(170deg, #f8f3e8 0%, #f2ede3 40%, #ede8da 100%);
}

.bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(226, 231, 75, 0.06), transparent 60%);
}

/* Subtle paper grain lines */
.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(160, 130, 80, 0.04) 28px,
      rgba(160, 130, 80, 0.04) 29px
    );
  mix-blend-mode: multiply;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Header */
.site-header {
  padding: 1.75rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--accent2);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-story {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-story:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-soft);
}

.nav-story:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.nav-etsy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-etsy:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-soft);
}

.nav-etsy:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

/* Hero */
.hero {
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.35rem 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-soft);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--accent3);
}

/* Archive section labels */
.archive-label {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--accent2);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* Torn paper wavy divider */
.torn-divider {
  color: var(--accent3);
  width: 100%;
  height: 20px;
  margin: 0.25rem 0;
  overflow: hidden;
  opacity: 0.55;
}

.torn-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sections */
section {
  padding: 2.5rem 0;
}

.section-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-intro {
  margin: 0 0 2rem;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.section-intro--wide {
  max-width: none;
  font-size: 1.2rem;
  line-height: 1.7;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.5rem 1.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent2);
}

.feature p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature card color variants */
.feature--yellow h3 { color: #b8a800; } /* darker chartreuse for readability on light bg */
.feature--yellow { border-color: rgba(226, 231, 75, 0.50); }

.feature--blue h3 { color: var(--accent2); }
.feature--blue { border-color: rgba(106, 170, 207, 0.40); }

.feature--tan h3 { color: #9a7a50; }
.feature--tan { border-color: rgba(196, 168, 130, 0.50); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: auto;
  max-width: 92%;
  padding: 0.45rem 0.75rem 0.55rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.65rem, 2vw, 0.82rem);
  text-align: left;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.70);
  background: linear-gradient(
    90deg,
    rgba(42, 31, 15, 0.78) 0%,
    rgba(42, 31, 15, 0.42) 75%,
    transparent 100%
  );
  border-radius: 0 var(--radius) 0 0;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

/* Map Legend */
.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.legend-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.legend-symbol {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
}

.legend-symbol svg {
  width: 100%;
  height: 100%;
}

.legend-item-text h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.legend-item-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Lightbox */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(42, 31, 15, 0.72);
  backdrop-filter: blur(4px);
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  width: min(980px, 100%);
  background: rgba(248, 243, 232, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 90px rgba(60, 40, 10, 0.30);
  padding: 0.75rem;
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover:not(:disabled) {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.lightbox-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lightbox-nav:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.lightbox-counter {
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.lightbox-img {
  display: block;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: rgba(242, 237, 227, 0.60);
}

.lightbox-caption {
  margin-top: 0.7rem;
  padding: 0 0.4rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 0.75rem;
  }

  .lightbox-inner {
    padding: 0.6rem;
  }

  .lightbox-img {
    max-height: 65vh;
  }

  .lightbox-toolbar {
    gap: 0.5rem;
  }
}

/* Etsy band */
.etsy-band {
  margin-top: 1rem;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.etsy-band p {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Our Story page */
.story-hero {
  padding: 3.5rem 0 0;
  text-align: center;
}

.story-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.story-body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.story-body p {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.story-closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem !important;
  color: var(--accent2) !important;
}

.story-plane {
  margin-top: 2.5rem;
  color: var(--accent3);
  opacity: 0.60;
}

.story-plane svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent2);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.inline-code {
  font-size: 0.9em;
  color: var(--accent2);
}
