/* =========================
   CHIP MONKS STYLES
   Clean, accessible design system
   ========================= */

/* =========================
   CSS CUSTOM PROPERTIES
   AAA-focused color palette
   ========================= */
:root {
  /* Light mode colors */
  --bg: #fffaf2;           /* natural beige background */
  --ink: #1f150f;          /* deep brown text (AAA contrast) */
  --ink-muted: #4d4338;    /* secondary text color */
  --card: #fff4e5;         /* light card background */
  --border: #d9cdbf;       /* subtle borders */
  
  /* Primary accent colors */
  --accent: #7a2d17;       /* dark ember brown */
  --accent-ink: #ffffff;   /* white text on accent */
  
  /* Form controls */
  --ctrl-bg: #ffffff;      /* input backgrounds */
  --ctrl-ink: var(--ink);   /* input text */
  --ctrl-border: #bfb3a5;   /* input borders */
  
  /* Focus states */
  --focus: #1a73e8;         /* high-contrast blue focus ring */
}

/* Dark mode (currently commented out)
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110f;
    --ink: #f4efe6;
    --ink-muted: #c8c0b6;
    --card: #1c1815;
    --border: #3a332e;
    --accent: #8b3a23;
    --accent-ink: #ffffff;
    --ctrl-bg: #241f1c;
    --ctrl-ink: var(--ink);
    --ctrl-border: #544b45;
    --focus: #8ab4f8;
  }
}
*/

/* =========================
   BASE STYLES
   ========================= */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================
   LAYOUT UTILITIES
   ========================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   ACCESSIBILITY
   ========================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  z-index: 10000;
  outline: 3px solid var(--focus);
}

/* =========================
   HEADER & NAVIGATION
   ========================= */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--bg) 88%, black 0%);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: radial-gradient(120% 120% at 20% 10%, #ffd9b3 0%, #f3a76f 35%, #e86b3d 70%, #c1492e 100%);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.45), inset 0 -6px 16px rgba(0, 0, 0, 0.12);
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  appearance: none;
  border: thin solid;
  border-color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--ctrl-border);
  color: var(--ink);
}

.btn-ghost:hover {
  background: color-mix(in oklab, var(--ctrl-bg) 85%, var(--ink) 5%);
}

/* =========================
   CONTENT SECTIONS
   ========================= */
.section {
  padding: 52px 0;
  border-top: 1px solid var(--border);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

h2 {
  font-size: 28px;
  margin: 0 0 12px;
}

h3 {
  margin-top: 0;
}

.card {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
}

/* Hero-specific typography */
.kicker {
  color: var(--ink-muted);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0.2em 0 0.4em;
}

.lede {
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 18px;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 8px;
}

.message {
  margin-top: 10px;
}

/* =========================
   BADGES & DECORATIVE ELEMENTS
   ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* =========================
   FORMS
   ========================= */
.signup {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  flex: 1;
}

label {
  font-weight: 700;
}

input[type="email"] {
  background: var(--ctrl-bg);
  color: var(--ctrl-ink);
  border: 1px solid var(--ctrl-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}

input[type="email"]::placeholder {
  color: color-mix(in oklab, var(--ink) 60%, transparent 40%);
}

input[type="email"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* =========================
   FOOTER
   ========================= */
footer {
  padding: 36px 0;
  color: var(--ink-muted);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   ACCESSIBILITY & MOTION
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
