/* =====================================================================
   styles.css — Generic Side Project Landing Page
   Design language derived from micasa.dev (© 2026 Phillip Cloud,
   Apache-2.0). Colours, spacing, and type hierarchy re-implemented
   from a public style audit; no original content copied.
   ===================================================================== */


/* =====================================================================
   STYLE SPEC — Design Tokens
   ➜ Start here when customising for a new project.
   ===================================================================== */

:root {
  /* --- Palette ---
     Warm, editorial, calm. Not pure-white or cold-grey.
     ----------------------------------------------------------------- */
  --color-bg:           #f5ede3;   /* page background (warm cream)      */
  --color-surface:      #ebe2d4;   /* cards, inline highlights (linen)  */
  --color-text:         #2d2a26;   /* primary text (near-black, warm)   */
  --color-text-soft:    #4a4640;   /* body paragraphs (charcoal-soft)   */
  --color-accent:       #c05e3c;   /* links, primary CTA (terracotta)   */
  --color-accent-dark:  #a04e30;   /* hover / pressed state             */
  --color-accent-alt:   #6b8f71;   /* secondary accent (sage green)     */
  --color-muted:        #9e958a;   /* footer, small labels (warm-gray)  */
  --color-rule:         #d9d2c9;   /* dividers, borders                 */

  /* --- Typography ---
     Two serif faces carry the editorial weight.
     Buttons/UI use the system sans — no terminal mono here.
     ----------------------------------------------------------------- */
  --font-body:     "Source Serif 4", "Georgia", "Times New Roman", serif;
  --font-display:  "DM Serif Display", "Georgia", serif;
  --font-ui:       system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:     ui-monospace, "Cascadia Mono", "Consolas", monospace;
  /* ↑ mono reserved only for code snippets; never used for hero/CTAs */

  /* --- Type scale ---
     Base is 18 px desktop / 16 px mobile (set on html element).
     ----------------------------------------------------------------- */
  --text-xs:    0.72rem;                        /* ~13 px — fine print  */
  --text-sm:    0.85rem;                        /* ~15 px — labels      */
  --text-base:  1rem;                           /*  18 px — body        */
  --text-md:    1.05rem;                        /* ~19 px — lead para   */
  --text-lg:    1.15rem;                        /* ~21 px — tagline     */
  --text-xl:    clamp(1.4rem, 5vw, 2rem);       /* section headings     */
  --text-hero:  clamp(2.5rem, 8vw, 3.5rem);    /* h1                   */

  /* --- Line heights --- */
  --leading-tight:  1.2;   /* headings                */
  --leading-snug:   1.4;   /* dt, step headings       */
  --leading-body:   1.7;   /* paragraphs              */

  /* --- Spacing scale (multiples of 4 px) ---
     Token names = multiples of 4 px baseline unit.
     ----------------------------------------------------------------- */
  --space-1:   0.25rem;    /*  4 px */
  --space-2:   0.5rem;     /*  8 px */
  --space-3:   0.75rem;    /* 12 px */
  --space-4:   1rem;       /* 16 px */
  --space-5:   1.25rem;    /* 20 px */
  --space-6:   1.5rem;     /* 24 px */
  --space-8:   2rem;       /* 32 px */
  --space-10:  2.5rem;     /* 40 px */
  --space-12:  3rem;       /* 48 px */
  --space-16:  4rem;       /* 64 px */
  --space-20:  5rem;       /* 80 px */

  /* --- Layout --- */
  --width-content:  740px;           /* narrow reading column  */
  --width-wide:     960px;           /* image / preview width  */
  --gutter:         var(--space-6);  /* horizontal container padding */

  /* --- Borders --- */
  --border-thin:   1px solid var(--color-rule);
  --border-accent: 3px solid var(--color-rule);  /* left-border on cards */
  --radius-sm:     4px;
  --radius-md:     6px;
  --radius-lg:     8px;

  /* --- Elevation --- */
  --shadow-card:  0 4px 24px rgba(45, 42, 38, 0.12);

  /* --- Motion --- */
  --transition-fast:  0.15s ease;
  --transition-slow:  0.5s ease;
}


/* =====================================================================
   Reset & base
   ===================================================================== */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
}


/* =====================================================================
   Skip link — first focusable element; essential for keyboard users
   ===================================================================== */

.skip-link {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 999;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  /* Visually hidden until focused */
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}


/* =====================================================================
   Typography
   ===================================================================== */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;           /* DM Serif Display renders at display weight */
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

/* Heading accent words — wrap any word in <span class="accent"> */
.accent     { color: var(--color-accent);     }
.accent-alt { color: var(--color-accent-alt); }

/* Dot after the product name */
.dot { color: var(--color-accent); }

p {
  color: var(--color-text-soft);
}


/* =====================================================================
   Links
   ===================================================================== */

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

/* Focus ring — visible but matches the palette */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* =====================================================================
   Layout helpers
   ===================================================================== */

.container {
  max-width: var(--width-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Wider container for preview images */
.container--wide {
  max-width: var(--width-wide);
}

section {
  padding-block: var(--space-16);
}

/* Fine rule between consecutive sections */
section + section {
  border-top: var(--border-thin);
}


/* =====================================================================
   Hero
   ===================================================================== */

.hero {
  padding-block: var(--space-20) var(--space-4);
  text-align: center;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

.brand {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1;
}

.brand:hover {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-accent);
}

.hero h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  max-width: 20ch;
  margin-inline: auto;
}

.tagline {
  font-size: var(--text-lg);
  color: var(--color-text-soft);
  max-width: 40ch;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.hero-description {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

/* CTA row */
.hero-cta {
  display: inline-flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-4);
}

/* Primary filled button */
.btn-primary {
  display: inline-block;
  padding: 0.6rem var(--space-6);
  background: var(--color-accent);
  color: var(--color-bg) !important;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-bg) !important;
}

/* Secondary outlined button */
.btn-secondary {
  display: inline-block;
  padding: 0.6rem var(--space-6);
  background: var(--color-surface);
  color: var(--color-text) !important;
  border: var(--border-thin);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--color-rule);
  color: var(--color-text) !important;
}

/* Tiny note below CTAs — platform, price, etc. */
.hero-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-muted);
}


/* =====================================================================
   Pitch / editorial hook
   (The italicised hook paragraphs between hero and first section)
   ===================================================================== */

.pitch-band {
  padding-block: var(--space-12);
  text-align: center;
}

.pitch {
  font-size: var(--text-md);
  color: var(--color-text-soft);
  max-width: 52ch;
  margin-inline: auto;
  font-style: italic;
  margin-bottom: var(--space-4);
}

.pitch.pitch-follow {
  font-style: normal;
  margin-bottom: 0;
}

/* Inline product name — slightly heavier, not monospaced */
.pitch strong {
  font-weight: 600;
  color: var(--color-text);
  font-style: normal;
}


/* =====================================================================
   Features
   ===================================================================== */

.features-list {
  list-style: none;
  display: grid;
  gap: var(--space-8);
}

/* Left-border card — same pattern as micasa testimonials */
.feature {
  border-left: var(--border-accent);
  padding-left: var(--space-5);
}

.feature h3 {
  color: var(--color-text);
  font-size: 1.1rem;
}

.feature p {
  font-size: var(--text-base);
  color: var(--color-text-soft);
  margin-top: var(--space-1);
}


/* =====================================================================
   How it works — numbered steps
   ===================================================================== */

.steps {
  list-style: none;
  display: grid;
  gap: var(--space-8);
}

.step {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

/* Large decorative step number — purely ornamental */
.step-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-rule);    /* very muted — visual rhythm, not info */
  flex-shrink: 0;
  width: 3.5rem;
  text-align: right;
  padding-top: 0.05em;         /* optically align with h3 cap height */
  user-select: none;
}

.step-body h3 {
  margin-bottom: var(--space-2);
}

.step-body p {
  color: var(--color-text-soft);
}


/* =====================================================================
   Preview / screenshot
   ===================================================================== */

.preview-figure {
  text-align: center;
}

/* The real image — use this class when you have a screenshot */
.preview-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-inline: auto;
}

/* Placeholder — remove once you supply a real image */
.preview-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: var(--border-thin);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-placeholder-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-figure figcaption {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-style: italic;
}


/* =====================================================================
   FAQ — definition list
   ===================================================================== */

.faq-list {
  display: grid;
  gap: 0;
}

.faq-item {
  padding-block: var(--space-6);
  border-bottom: var(--border-thin);
}

.faq-item:first-child {
  border-top: var(--border-thin);
}

.faq-item dt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
}

.faq-item dd {
  color: var(--color-text-soft);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  margin-left: 0;   /* reset browser default indent */
}


/* =====================================================================
   Resources / links list
   ===================================================================== */

.resources-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-8);
}

.resources-list li {
  font-size: var(--text-base);
}


/* =====================================================================
   Footer
   ===================================================================== */

footer {
  padding-block: var(--space-12);
  border-top: var(--border-thin);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: center;
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-copy {
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  margin-bottom: var(--space-2);
}

.footer-copy:last-child {
  margin-bottom: 0;
}

.footer-copy a {
  color: var(--color-text-soft);
}


/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding-block: var(--space-12) var(--space-2);
  }

  .site-header {
    flex-direction: column;
    margin-bottom: var(--space-10);
  }

  .site-nav {
    gap: var(--space-4);
  }

  section {
    padding-block: var(--space-12);
  }

  /* Stack step number above content on mobile */
  .step {
    flex-direction: column;
    gap: var(--space-2);
  }

  .step-num {
    width: auto;
    text-align: left;
    font-size: 1.5rem;
  }

  /* Stack resource links vertically */
  .resources-list {
    flex-direction: column;
    gap: var(--space-3);
  }
}


/* =====================================================================
   Reduced motion
   ===================================================================== */

@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;
  }
}
