/* ============================================================
   REELIO — style.css
   Parchment theme — mirrors the iOS app's Parchment colour scheme
   Background: #faf7f2 | Surface: #ffffff | Green accent: #1a5f3c
   Alt bg: #f3efe6 | Body text: #1a1a1a | Muted: #666666
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap&subset=latin');

/* --- CSS Variables --- */
:root {
  --green:       #1a5f3c;
  --green-mid:   #22804f;
  --green-light: #2d9e63;
  --green-dark:  #14532d;

  --bg:          #faf7f2;
  --bg-alt:      #f3efe6;
  --surface:     #ffffff;

  --ink:         #1a1a1a;
  --ink-muted:   #666666;
  --ink-subtle:  #b0b0b0;

  --border:      #e8e4de;
  --border-green: #1a5f3c;
  --card-border: #e5e5e5;
  --rule:        rgba(26, 95, 60, 0.18);

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Source Sans 3', 'Gill Sans', Calibri, sans-serif;

  --max-w: 1100px;
  --radius: 6px;
  --transition: 0.22s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; scrollbar-gutter: stable; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-mid); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--ink-muted); }
p:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 600; }

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

section { padding: 5rem 0; }

.section-rule {
  width: 60px;
  height: 2px;
  background: var(--green);
  margin-bottom: 1.5rem;
}

/* --- Fade-in on scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAV
   ============================================================ */
/* Wrapper — no background, just lets body colour show through */
.nav-hero-wrapper {
  background: transparent;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.nav-logo__icon {
  width: 30px;
  height: 36px;
  flex-shrink: 0;
}

.nav-logo__wordmark {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.02em;
}

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

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

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

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 19px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: #faf7f2;
  padding: 1.5rem 1.25rem 2rem;
  gap: 1.25rem;
  border-top: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

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

.nav-mobile a {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-mobile a:hover { color: var(--green); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 2rem 0 12px;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}


.hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.hero__headline {
  color: var(--ink);
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 540px;
  margin-bottom: 1.25rem;
}

.hero__badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero__badge {
  display: inline-block;
  transition: opacity var(--transition);
}

.hero__badge:hover { opacity: 0.8; }
.hero__badge img, .hero__badge svg { height: 46px; width: auto; }

.footer-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* App preview image */
.hero__phone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.app-preview-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--bg);
}

/* Inline feature list */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.feature-list__item {
  font-family: var(--font-sans);
}

.feature-list__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: var(--ink-muted);
}

.feature-list__row svg {
  flex-shrink: 0;
  color: var(--ink-muted);
}

.feature-list__desc {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin: 0;
  padding-left: 24px; /* 16px icon + 8px gap */
}

/* ============================================================
   SECTION DIVIDER — Celtic knotwork
   ============================================================ */
.knotwork-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.knotwork-divider__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.knotwork-divider__knot {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  opacity: 0.45;
}

/* Push footer to bottom of viewport on short pages */
main,
.nav-hero-wrapper--home { flex: 1; }


/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.about .section-rule { background: var(--green); }

.about__inner {
  max-width: 720px;
}

.about p { color: var(--ink-muted); font-size: 1.05rem; }

/* ============================================================
   ATTRIBUTION
   ============================================================ */
.attribution {
  background: var(--bg);
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.attribution p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
}

.attribution a { color: var(--green); font-weight: 600; }
.attribution a:hover { color: var(--green-mid); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-alt);
  color: var(--ink-muted);
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-badge { display: inline-block; }
.footer-badge svg, .footer-badge img { height: 44px; width: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

.footer-break { display: none; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-subtle);
  margin: 0;
}

/* ============================================================
   INNER PAGE HERO (privacy, terms, support, thank-you)
   ============================================================ */
.page-hero {
  background: transparent;
  padding: 2rem 0 0.75rem;
}

.page-hero h1 { color: var(--ink); font-size: clamp(1.75rem, 4vw, 2.5rem); }
.page-hero .hero__eyebrow { margin-bottom: 0.5rem; }

/* ============================================================
   CONTENT PAGE (privacy, terms)
   ============================================================ */
.content-page { padding: 1.5rem 0 4rem; }

.content-page__body {
  max-width: 740px;
}

.content-page__body h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.content-page__body h3 {
  margin-top: 1.75rem;
  color: var(--green);
}

.content-page__body p,
.content-page__body li {
  font-size: 0.975rem;
  color: var(--ink-muted);
}

.content-page__body ul,
.content-page__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-page__body li { margin-bottom: 0.4rem; }

.content-page__body a { color: var(--green); font-weight: 600; }
.content-page__body a:hover { color: var(--green-mid); }

.policy-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   SUPPORT PAGE
   ============================================================ */
.support-intro { max-width: 600px; margin-bottom: 1.75rem; }
.support-intro p { font-size: 1.05rem; }

/* FAQ accordion */
.faq { margin-bottom: 2rem; padding: 0; }

.faq h2 { margin-bottom: 1rem; }

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

.faq-item:first-of-type { border-top: 1px solid var(--border); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 1.1rem 0;
  gap: 1rem;
  min-height: 44px;
}

.faq-question__text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.faq-question__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--green);
  transition: transform var(--transition);
}

.faq-item.open .faq-question__icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
}

.faq-answer p { font-size: 0.95rem; margin: 0; }

.faq-item.open .faq-answer { display: block; }

/* Contact form */
.contact-form { max-width: 600px; padding: 0; }
.contact-form h2 { margin-bottom: 1.25rem; }

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26, 95, 60, 0.1);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a5f3c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.honeypot { display: none !important; }

.form-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #b91c1c;
  font-size: 0.9rem;
}

.form-error.visible { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

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

.btn-primary:hover {
  background: var(--green-mid);
  box-shadow: 0 4px 14px rgba(26, 95, 60, 0.2);
  transform: translateY(-1px);
  color: #fff;
}

/* ============================================================
   THANK YOU PAGE
   ============================================================ */
.thank-you {
  padding: 8rem 0;
  text-align: center;
}

.thank-you__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 2rem;
  color: var(--green);
}

.thank-you h1 { margin-bottom: 1rem; }
.thank-you p { font-size: 1.1rem; margin-bottom: 2rem; }

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: #fff;
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 2px solid var(--green);
  padding: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-banner p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0;
}

.cookie-banner a { color: var(--green); font-weight: 600; }

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition);
  min-height: 44px;
}

.btn-cookie-accept:hover { background: var(--green-mid); }

.btn-cookie-decline {
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color var(--transition), color var(--transition);
  min-height: 44px;
}

.btn-cookie-decline:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

/* ============================================================
   COOKIE SETTINGS PANEL
   ============================================================ */
.cookie-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
}

.cookie-panel-overlay.visible { display: block; }

.cookie-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 301;
  background: var(--surface);
  border-top: 2px solid var(--green);
  border-radius: 12px 12px 0 0;
  padding: 2rem 1.25rem 2.5rem;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-panel.visible { transform: translateY(0); }

.cookie-panel__inner { max-width: 600px; margin: 0 auto; }

.cookie-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.cookie-panel > .cookie-panel__inner > p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}

.cookie-category {
  border: 0.5px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.cookie-category__info { flex: 1; }
.cookie-category__info h4 { color: var(--ink); margin-bottom: 0.25rem; }
.cookie-category__info p { font-size: 0.85rem; margin: 0; }

/* Toggle switch */
.cookie-toggle {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  margin-top: 2px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle__track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .cookie-toggle__track { background: var(--green); }
.cookie-toggle input:checked + .cookie-toggle__track::after { transform: translateX(20px); }
.cookie-toggle input:disabled + .cookie-toggle__track { opacity: 0.5; cursor: not-allowed; }

.cookie-panel__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-panel-save {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background var(--transition);
  min-height: 44px;
}

.btn-panel-save:hover { background: var(--green-mid); }

.btn-panel-close {
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  min-height: 44px;
}

.btn-panel-close:hover { border-color: var(--ink-muted); }

/* ============================================================
   RESPONSIVE — 1024px (desktop)
   ============================================================ */
@media (min-width: 1025px) {
  .nav-links { display: flex; }
  .nav-hamburger { display: none; }
  .nav-mobile { display: none !important; }

  .hero__inner {
    grid-template-areas:
      "content phone"
      "badges  phone";
    grid-template-columns: 2fr 3fr;
    gap: 1rem 2rem;
    align-items: center;
  }

  .hero__content { grid-area: content; align-self: end; }
  .hero__phone   { grid-area: phone;   align-self: center; }
  .hero__badges  { grid-area: badges;  align-self: start; }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .cookie-banner__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-banner__actions { flex-wrap: nowrap; }

  .cookie-panel { padding: 2.5rem 2rem 3rem; }
}

/* ============================================================
   RESPONSIVE — below 1024px (mobile)
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { padding: 2rem 0 12px; }

  .hero__inner { gap: 1rem; }

  .feature-list { display: none; }

  .hero__sub { margin-bottom: 0.75rem; }

  .hero__badges {
    justify-content: center;
    margin-top: 0.75rem;
  }

  .hero__phone {
    display: block;
    padding-top: 0;
    overflow: visible;
  }

  .app-preview-img {
    width: 100%;
    max-width: 100%;
  }

  .site-footer__inner { align-items: center; gap: 0.5rem; }
  .footer-links { gap: 0 0.75rem; justify-content: center; }
  .footer-links a { min-height: 36px; }
  .footer-break { display: block; flex-basis: 100%; height: 0; }
  .footer-copy { text-align: center; }
}
