/* ============================================================
   Wickbrook - site stylesheet
   Warm night theme: lamp amber on deep ink. Matches the Quillmoth
   brand kit so the suite reads as one family.
   No frameworks, no external requests. Mobile-first. Accessible.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg:            #14131f;   /* Night */
  --bg-alt:        #191828;
  --surface:       #1f1e33;
  --surface-2:     #26243d;   /* Ink */
  --border:        rgba(247, 238, 218, 0.10);
  --border-strong: rgba(247, 238, 218, 0.22);

  --text:          #f7eeda;   /* Cream */
  --text-muted:    #b9b2a2;
  --text-faint:    #8d877b;

  --accent:        #e09e29;   /* Lamp amber */
  --accent-hover:  #f2b648;
  --accent-soft:   rgba(224, 158, 41, 0.12);
  --on-accent:     #1a1203;

  --radius:        16px;
  --radius-sm:     10px;
  --radius-pill:   999px;

  --maxw:          1100px;
  --gap:           clamp(1rem, 2.5vw, 1.75rem);

  --shadow-md:     0 12px 32px rgba(0, 0, 0, 0.45);

  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
                   Helvetica, Arial, sans-serif;
  --font-display:  "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                   Georgia, serif;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img, svg { max-width: 100%; }
img { height: auto; border: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
p { margin: 0 0 1rem; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 19, 31, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

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

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark img { display: block; width: 32px; height: 32px; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
}
.nav-menu.is-open { display: block; }

.nav-links { list-style: none; margin: 0 0 1rem; padding: 0; }
.nav-links a { display: block; padding: 0.65rem 0; color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--accent-hover); }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: static;
    background: none;
    border: 0;
    padding: 0;
  }
  .nav-links { display: flex; gap: 1.75rem; margin: 0; }
  .nav-links a { padding: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn-ghost { font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(224, 158, 41, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(38, 36, 61, 0.9), transparent 70%),
    var(--bg);
}
.hero-inner { max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4rem); letter-spacing: -0.025em; margin-bottom: 1.25rem; }
.hero .lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--text-muted); max-width: 42rem; margin-bottom: 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.trust-line { display: flex; align-items: center; gap: 0.5rem; margin: 1.75rem 0 0; color: var(--text-faint); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: var(--gap);
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.app-icon { display: block; margin-bottom: 1rem; }
.app-icon img { display: block; width: 56px; height: 56px; border-radius: 13px; }
.product-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.2rem; margin-bottom: 0.25rem; }
.category { display: block; font-size: 0.85rem; color: var(--text-faint); margin-bottom: 0.9rem; }
.product-card p { color: var(--text-muted); flex: 1; }
.card-cta { font-weight: 600; margin-top: 0.25rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(224, 158, 41, 0.3);
}

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--gap); }
.pillar { padding: 0.25rem 0; }
.pillar-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}
.pillar h3 { font-size: 1.15rem; }
.pillar p { color: var(--text-muted); }

/* ---------- About ---------- */
.about { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 860px) { .about { grid-template-columns: 1.3fr 1fr; } }
.about p { color: var(--text-muted); font-size: 1.05rem; }
.about p strong { color: var(--text); font-weight: 600; }
.name-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.name-card img { width: 56px; height: 56px; margin-bottom: 1rem; }
.name-card h3 { font-family: var(--font-display); font-size: 1.4rem; }
.name-card p { margin: 0; font-size: 1rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .container { max-width: 700px; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.cta-band p { color: var(--text-muted); font-size: 1.05rem; }
.cta-band .cta-row { justify-content: center; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; background: var(--bg); }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand p { color: var(--text-faint); margin: 0.9rem 0 0; max-width: 24rem; font-size: 0.95rem; }
.footer-col h4 { font-family: var(--font); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-hover); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
