/* ==========================================================================
   Family Gift Manager — Elegant Responsive Stylesheet
   ========================================================================== */

:root {
  --bg: #faf8f4;
  --bg-alt: #f2ede4;
  --surface: #ffffff;
  --surface-subtle: #fcfaf6;
  --border: #e6dfd3;
  --border-strong: #d5cbb9;

  --text: #1c2421;
  --text-muted: #52605b;
  --text-soft: #717f7a;

  --primary: #1b4d3e;
  --primary-hover: #143b2f;
  --primary-soft: #e7f0ec;
  --accent: #c58b2b;
  --accent-soft: #fbf2df;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(28, 36, 33, 0.06);
  --shadow-md: 0 12px 32px rgba(27, 77, 62, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --container: 1120px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #f8f5ee;
  padding: 6px;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link-pill {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-link-pill:hover,
.nav-link-pill.active {
  background: var(--primary);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Typography Helpers & Buttons
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-text {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.btn-text:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Hero Section
   -------------------------------------------------------------------------- */

.hero {
  padding: 4.5rem 0 4rem;
  background: radial-gradient(circle at top right, rgba(197, 139, 43, 0.1), transparent 48%),
              radial-gradient(circle at bottom left, rgba(27, 77, 62, 0.07), transparent 45%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin-bottom: 1.15rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-highlights li::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.45rem;
}

/* Preview Mockup Card */
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.preview-badge {
  background: var(--accent-soft);
  color: #8c5d12;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.preview-meta {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.preview-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.gift-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.gift-name {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
}

.gift-for {
  display: block;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-claimed {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-open {
  background: #f0ece3;
  color: var(--text-muted);
}

.status-wrapped {
  background: var(--accent-soft);
  color: #8c5d12;
}

.preview-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Sections & Cards
   -------------------------------------------------------------------------- */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.65rem;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.feature-card,
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
}

.feature-card h3,
.platform-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-card p,
.platform-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.muted-note {
  margin-top: 1rem !important;
  font-size: 0.86rem !important;
  color: var(--text-soft) !important;
}

.callout-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--primary);
  color: #f8f5ee;
  padding: 2.25rem 2.5rem;
  border-radius: var(--radius-lg);
}

.callout-banner .eyebrow {
  color: #ebd096;
}

.callout-banner h2 {
  color: #ffffff;
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.callout-banner p {
  margin: 0;
  color: rgba(248, 245, 238, 0.88);
  max-width: 60ch;
}

.callout-banner .btn-primary {
  background: #f8f5ee;
  color: var(--primary);
}

.callout-banner .btn-primary:hover {
  background: #ffffff;
}

/* Privacy Policy Page
   -------------------------------------------------------------------------- */

.policy-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}

.policy-hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  margin-bottom: 0.6rem;
}

.policy-subtitle {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 65ch;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.policy-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
  align-items: start;
}

.policy-toc {
  position: sticky;
  top: 90px;
}

.toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.toc-title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin-bottom: 0.85rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toc-list a {
  display: block;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}

.policy-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.template-notice {
  background: var(--accent-soft);
  border: 1px solid #e6c989;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  color: #4f370d;
}

.placeholder {
  background: #fff3c4;
  color: #5c3d00;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

.policy-section {
  scroll-margin-top: 92px;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.policy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.policy-section h2 {
  font-size: 1.45rem;
  margin-bottom: 0.8rem;
}

.policy-section h3 {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.35rem 0 0.5rem;
}

.policy-section p {
  margin: 0 0 0.9rem;
}

.policy-section ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.policy-section li {
  margin-bottom: 0.45rem;
}

.info-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1rem 0;
}

.info-box p {
  margin-bottom: 0.4rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* 404 Page
   -------------------------------------------------------------------------- */

.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.not-found-inner {
  max-width: 520px;
}

.not-found-inner .hero-actions {
  justify-content: center;
  margin-top: 1.5rem;
}

/* Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.75rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

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

.footer-bottom {
  padding-top: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.footer-bottom p {
  margin: 0;
}

/* Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

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

  .policy-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .policy-toc {
    position: static;
  }

  .callout-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    box-shadow: var(--shadow-md);
  }

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

  .feature-grid,
  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .policy-content {
    padding: 1.5rem 1.25rem;
  }

  .callout-banner {
    padding: 1.75rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Print Stylesheet (for Privacy Policy PDF export)
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .policy-toc,
  .btn-text,
  .site-footer {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .policy-layout {
    display: block;
    padding: 0;
  }

  .policy-content {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .policy-hero {
    background: none;
    border-bottom: 1px solid #cccccc;
    padding: 0 0 1rem;
  }
}
