/*
 * Portfolio design tokens.
 *
 * Hand-written, using the role names from the design-system method
 * (~/design-system-persimyn, design-system-method-charter.md) so this file
 * can become a generated brand later without renaming anything.
 *
 * Colors: PNW forest palette (Michael's Paper, Stone, Fir, Cedar, Moss),
 * with in-between surfaces and dark-mode values derived in OKLCH.
 * Still a proposal under review in the colors step of NEXT_STEPS.md.
 *
 * Roles marked "portfolio-only" are not in the method's vocabulary.
 */

:root {
  color-scheme: light dark;

  /* Palette: Paper #f1efe8, Stone #e3ddd2, Fir #12241f, Cedar #604636 (used lightened), Moss #345b43 (links use a lighter, greener version) */

  /* Surfaces */
  --colors-bg-page: #f1efe8;                /* Paper */
  --colors-bg-raised: #fdfcf9;              /* cards; Paper hue at Persimyn's raised lightness */
  --colors-bg-raised-hover: #ffffff;        /* cards on hover; portfolio-only */

  /* Text */
  --colors-text-primary: #12241f;           /* Fir */
  --colors-text-secondary: #745643;         /* Cedar, lightened to sit level with links: card dates */
  --colors-text-heading: #604636;           /* Cedar (source value): Fraunces titles; portfolio-only */

  /* Borders */
  --colors-border-soft: #e3ddd2;            /* Stone; method role, currently unused */
  --colors-border: #cfc8bb;                 /* card header divider */
  --colors-border-strong: #b39888;          /* light Cedar; intro rule on wider screens */

  /* Links (method optional role: link) */
  --colors-link: #337344;                   /* lighter, greener Moss (option B) */
  --colors-link-hover: #345b43;             /* Moss; portfolio-only */

  /* Shadows, tinted with Fir */
  --shadow-raised: 0 .25rem 1rem rgba(18, 36, 31, .15);   /* cards */
  --shadow-overlay: 0 .5rem 1.5rem rgba(18, 36, 31, .2);  /* cards on hover */
  --shadow-image: 0 .125rem .5rem rgba(18, 36, 31, .15);  /* screenshots (portfolio-only) */

  /* Typography */
  --font-family-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;      /* body */
  --font-family-serif: "Fraunces", Georgia, serif;      /* titles */
  --font-weight-light: 300;                 /* portfolio-only; method has regular/medium/strong */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-strong: 700;                /* titles (Fraunces) */

  /* Motion (method defaults) */
  --duration-fast: 150ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  /* Type sizes, tier 1 (rem on a 16px root); the two largest scale with
     the viewport. Body sizes are one step up for Source Sans 3's smaller
     x-height (0.478 vs the system font's 0.508). */
  --text-size-sm: 0.875rem;                                   /* 14px */
  --text-size-md: 0.9375rem;                                  /* 15px */
  --text-size-lg: 1.0625rem;                                  /* 17px */
  --text-size-xl: 1.125rem;                                   /* 18px */
  --text-size-2xl: 1.25rem;                                   /* 20px */
  --text-size-3xl: 1.5rem;                                    /* 24px */
  --text-size-4xl: clamp(1.75rem, 1.25rem + 1.25vw, 2.25rem); /* 28-36px */
  --text-size-5xl: clamp(2rem, 1.25rem + 2.5vw, 3rem);        /* 32-48px */

  --leading-tight: 1.1;    /* display, heading-1 */
  --leading-snug: 1.3;     /* heading-2 to heading-4 */
  --leading-normal: 1.5;   /* body, lead, captions */

  /* Text styles, tier 2: what each kind of text uses */
  --text-display: var(--text-size-5xl);    /* homepage name */
  --text-heading-1: var(--text-size-4xl);  /* case-study titles */
  --text-heading-2: var(--text-size-3xl);  /* section headings */
  --text-heading-3: var(--text-size-2xl);  /* subheadings */
  --text-heading-4: var(--text-size-xl);   /* card titles */
  --text-lead: var(--text-size-3xl);       /* intro quote, pull quotes; portfolio-only */
  --text-body-1: var(--text-size-lg);      /* paragraphs */
  --text-body-2: var(--text-size-md);      /* card subtitles */
  --text-caption: var(--text-size-sm);     /* captions, dates */
}

@media (prefers-color-scheme: dark) {
  :root {
    --colors-bg-page: #12241f;              /* Fir */
    --colors-bg-raised: #1c302a;
    --colors-bg-raised-hover: #243832;

    --colors-text-primary: #f1efe8;         /* Paper */
    --colors-text-secondary: #d4b8a1;       /* light Cedar */
    --colors-text-heading: #e5cbb7;         /* pale Cedar */

    --colors-border-soft: #23352f;
    --colors-border: #32443f;
    --colors-border-strong: #856c5c;

    --colors-link: #95dfa4;                 /* light Moss (option B) */
    --colors-link-hover: #b4efbf;

    --shadow-raised: 0 .25rem 1rem rgba(0, 0, 0, .5);
    --shadow-overlay: 0 .5rem 1.5rem rgba(0, 0, 0, .6);
    --shadow-image: 0 .125rem .5rem rgba(0, 0, 0, .4);
  }
}
