/* ============================================================
   EDITORIAL SKIN  —  html[data-skin="editorial"]
   A third visual lens: the SAME portfolio, art-directed like a
   modern magazine feature. Cream paper, deep-plum ink, a serif
   display face (Fraunces), vibrant periwinkle, soft coral, warm
   gold. Color is concentrated in a few editorial moments, never
   spread as glows. Overrides ONLY; scoped to [data-skin="editorial"]
   so Classic and Expressive are completely unaffected.
   Cream magazine look shows in light mode; a warm "after-hours"
   editorial in dark mode. Toggle lives in theme.js.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&display=swap');

/* ---- Accents (concentrated, meaningful color; green reduced) ---- */
html[data-skin="editorial"] {
  --slack-blue:   #6D7CFF;   /* periwinkle  -> accent-1 (signature) */
  --slack-green:  #6D7CFF;   /* reduce green: map to periwinkle */
  --slack-yellow: #F2C94C;   /* warm gold */
  --slack-red:    #FF7A6E;   /* soft coral */
  --slack-purple: #4A2FA0;
  --slack-purple-light: #7E87EE;
  --accent-1: #7E87EE;   /* periwinkle (cooled + deepened, less warm/lavender) */
  --accent-2: #FB7B7B;   /* coral (sampled from reference) */
  --accent-3: #EFC45D;   /* gold (sampled from reference) */
  --accent-4: #5B4BBF;   /* indigo */
  --ed-peri: #7E87EE; --ed-coral: #FB7B7B; --ed-gold: #EFC45D; --ed-indigo: #5B4BBF;
  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
}

/* ---- Light = the cream magazine (the showcase) ---- */
html[data-skin="editorial"][data-theme="light"] {
  --surface-0: #FBF1E4;   /* warm cream page, matched to the portrait composite so it blends seamlessly */
  --surface-1: #FFFDF6;   /* paper card */
  --surface-2: #EFEAE1;   /* de-yellowed: cleaner cream, not harvest tan (read as 70s) */
  --surface-3: #E5DED1;
  --text-primary: #1C1136;
  --text-secondary: rgba(28,17,54,0.92);
  --text-tertiary: rgba(28,17,54,0.74);
  --border-subtle: rgba(36,16,70,0.10);
  --border-medium: rgba(36,16,70,0.20);
}

/* ---- Case-study accents, made legible on cream ----
   Each case study's --cs-accent is a bright Slack-palette color chosen for its original
   DARK hero. As text on the editorial cream those fail WCAG contrast, so in light mode
   each page gets a darkened, accessible accent in the same family (welcome shifts to its
   semantic identity periwinkle, since yellow cannot stay yellow and remain legible). The
   matching --cs-accent-rgb keeps tints, borders, and on-accent fills coherent. Automation
   keeps its deep purple, which already passes. Dark mode is unaffected. */
html[data-skin="editorial"][data-theme="light"][data-cs="welcome"]    { --cs-accent: #5B4BBF; --cs-accent-rgb: 91,75,191; }
html[data-skin="editorial"][data-theme="light"][data-cs="agentforce"] { --cs-accent: #1A6A96; --cs-accent-rgb: 26,106,150; }
html[data-skin="editorial"][data-theme="light"][data-cs="search"]     { --cs-accent: #1C7049; --cs-accent-rgb: 28,112,73; }
html[data-skin="editorial"][data-theme="light"][data-cs="apps"]       { --cs-accent: #C0184B; --cs-accent-rgb: 192,24,75; }
html[data-skin="editorial"][data-theme="light"][data-cs="skills"]     { --cs-accent: #4B4FD6; --cs-accent-rgb: 75,79,214; }
html[data-skin="editorial"][data-theme="light"][data-cs="builder"]    { --cs-accent: #4B4FD6; --cs-accent-rgb: 75,79,214; }

/* ---- Craft tuning for the cream skin (from a visual-design review) ----
   A few base values were set for the original dark theme and read off on cream:
   looser leading, pure-black drop-shadows, drifting label tracking. Tightened here. */
html[data-skin="editorial"] .about__text p,
html[data-skin="editorial"] .builds__intro { line-height: 1.7; }
html[data-skin="editorial"] .cs-section__text { line-height: 1.72; }
html[data-skin="editorial"] .hero__title { line-height: 1.1; }
html[data-skin="editorial"] .cs-figure img,
html[data-skin="editorial"] .cs-figure video { box-shadow: 0 20px 50px rgba(28,17,54,0.14); }
html[data-skin="editorial"] .case-card:hover { box-shadow: 0 22px 50px rgba(28,17,54,0.18); }
html[data-skin="editorial"] .build-card__shot { box-shadow: 0 14px 32px rgba(28,17,54,0.23); }
html[data-skin="editorial"] .case-card__tag,
html[data-skin="editorial"] .about__detail-label,
html[data-skin="editorial"] .voice__by { letter-spacing: 0.14em; }

/* ---- Dark = warm "after-hours" editorial ---- */
html[data-skin="editorial"][data-theme="dark"] {
  --aubergine-deep: #1B0B33;
  --aubergine:      #241338;
  --aubergine-mid:  #3A2A66;
  --surface-2: #2E1B46;
  --surface-3: #3A2A66;
  --text-primary: #F6F1E7;
  --text-secondary: rgba(246,241,231,0.74);
  --text-tertiary: rgba(246,241,231,0.5);
  --border-subtle: rgba(246,241,231,0.10);
  --border-medium: rgba(246,241,231,0.20);
}

/* ---- Display typography: serif headlines, sans body ---- */
html[data-skin="editorial"] .hero__title,
html[data-skin="editorial"] .section__title,
html[data-skin="editorial"] .cs-hero__title,
html[data-skin="editorial"] .cs-section__title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}
html[data-skin="editorial"] .hero__title { font-weight: 600; letter-spacing: -0.025em; }
html[data-skin="editorial"] .hero__title em { font-style: italic; font-weight: 600; color: var(--accent-1); position: relative; display: inline-block; }

/* hand-painted brush underline under the emphasized word only */
html[data-skin="editorial"] .hero__title em::after {
  content: ''; position: absolute; left: 0; right: -3%; bottom: -0.16em; height: 0.3em;
  background: url(images/editorial/underline-brush.svg) left center/100% 100% no-repeat;
  pointer-events: none;
}

/* ---- Eyebrows + section labels: editorial small-caps with a periwinkle dot ---- */
html[data-skin="editorial"] .hero__eyebrow,
html[data-skin="editorial"] .section__label,
html[data-skin="editorial"] .cs-section__label,
html[data-skin="editorial"] .cs-hero__label {
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--accent-1);
}
html[data-skin="editorial"] .section__label::before,
html[data-skin="editorial"] .cs-section__label::before { background: var(--accent-1); border-radius: 50%; }
html[data-skin="editorial"] .hero__eyebrow::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-1); margin-right: 0.6rem; vertical-align: middle;
}

/* ---- Accessibility: deepen the small-caps label periwinkle on cream (light mode only).
   #7E87EE was ~2.9:1 on cream (fails WCAG AA); #5B4BBF is ~5.9:1, same periwinkle family.
   Only the labels + their dots change here; --accent-1 stays the brand color everywhere else,
   and dark mode keeps #7E87EE (which passes on the dark bg). ---- */
html[data-skin="editorial"][data-theme="light"] .hero__eyebrow,
html[data-skin="editorial"][data-theme="light"] .section__label,
html[data-skin="editorial"][data-theme="light"] .cs-section__label,
html[data-skin="editorial"][data-theme="light"] .cs-hero__label { color: #5B4BBF; }
html[data-skin="editorial"][data-theme="light"] .hero__eyebrow::before,
html[data-skin="editorial"][data-theme="light"] .section__label::before,
html[data-skin="editorial"][data-theme="light"] .cs-section__label::before { background: #5B4BBF; }

/* ---- About: a real portrait, art-directed with brush strokes + ink ---- */
html[data-skin="editorial"] .about__portrait {
  position: relative; overflow: visible; border: none; background: transparent;
  box-shadow: none; border-radius: 0; isolation: isolate;
}
html[data-skin="editorial"] .about__portrait::before {
  content: ''; position: absolute; z-index: -1;
  left: -22%; right: -22%; top: -15%; bottom: -8%;
  background: url(images/editorial/portrait-brushes.svg) center/contain no-repeat;
  pointer-events: none;
}
html[data-skin="editorial"] .about__portrait img {
  filter: grayscale(1) contrast(1.07) brightness(1.03);
  border-radius: 0;
  box-shadow: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 84% at 50% 43%, #000 55%, rgba(0,0,0,0.4) 76%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 84% at 50% 43%, #000 55%, rgba(0,0,0,0.4) 76%, transparent 100%);
}
/* Editorial portrait, two finishes (one per theme):
   LIGHT  = the single pre-composited image (B&W cut-out + painted brush strokes
            + ink, baked on cream #FBF1E4 that matches the page), so it reads as
            art floating on the page with no card edge.
   DARK   = the cream image would be a bright card on the plum page, so dark
            falls back to the transparent cut-out-over-painted-brushes treatment. */
html[data-skin="editorial"] .about__portrait--cutout {
  aspect-ratio: 1 / 1;
  border: none; border-radius: 0; overflow: visible;
  background: transparent; box-shadow: none;
}
html[data-skin="editorial"] .about__portrait--cutout img { opacity: 0; aspect-ratio: 1 / 1; height: auto; }

/* LIGHT: baked cream composite, blends into the matching cream page (no card) */
html[data-skin="editorial"][data-theme="light"] .about__portrait--cutout::before { display: none; }
html[data-skin="editorial"][data-theme="light"] .about__portrait--cutout::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: url(images/editorial/portrait-editorial-composite.jpg) center/contain no-repeat;
  filter: none; pointer-events: none;
}

/* DARK: cut-out over painted brushes, transparent (the base .about__portrait::before
   supplies the paint); no cream card on the plum page */
html[data-skin="editorial"][data-theme="dark"] .about__portrait--cutout::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: url(images/editorial/portrait-cutout.png) center/contain no-repeat;
  filter: grayscale(1) contrast(1.05); pointer-events: none;
}

/* Light editorial = one uniform cream. The section bands (.about, .builds) normally
   use the paper surface, which made the portrait's cream read as a card on whiter
   paper. Match them to the page so the whole light skin is the same cream and nothing
   reads as a card behind the picture. */
html[data-skin="editorial"][data-theme="light"] .about,
html[data-skin="editorial"][data-theme="light"] .builds {
  background: var(--surface-0);
  border-color: transparent;
}
/* lift the Built-with-Claude cards off the uniform cream with a soft periwinkle wash (brand color) */
html[data-skin="editorial"][data-theme="light"] .build-card {
  background: rgba(109,124,255,0.07);
  border-color: rgba(109,124,255,0.30);
  box-shadow: 0 14px 36px rgba(20,8,40,0.08);
}

/* Stat pills wore the dated tan surface as a "pop". Re-tint with a pale brand
   periwinkle (each card keeps its own semantic number color on top). */
html[data-skin="editorial"] .case-card__stat { background: rgba(109,124,255,0.10); }
/* the About title set in the serif, with the key word in periwinkle */
html[data-skin="editorial"] #about .section__title { color: var(--text-primary); }

/* ---- Design Principles: magazine numerals + editorial accents ---- */
html[data-skin="editorial"] .philosophy__grid { counter-reset: phil; }
html[data-skin="editorial"] .philosophy__card { position: relative; counter-increment: phil; }
html[data-skin="editorial"] .philosophy__card {
  display: flex; flex-direction: column; justify-content: center;
}
/* the 01-04 number is an in-flow, centered block above the icon (resetting the
   base accent-bar's width/transform/background so it can't get trapped off-screen) */
html[data-skin="editorial"] .philosophy__card::before {
  content: counter(phil, decimal-leading-zero);
  position: static; display: block;
  width: auto; height: auto; transform: none; background: none; border-radius: 0;
  margin: 0 0 0.5rem; text-align: center;
  font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1;
  color: var(--accent-1); opacity: 0.3;
}
html[data-skin="editorial"] .philosophy__card:nth-child(1) .philosophy__icon { background: rgba(109,124,255,0.12); color: var(--ed-peri); }
html[data-skin="editorial"] .philosophy__card:nth-child(2) .philosophy__icon { background: rgba(91,75,191,0.12);  color: var(--ed-indigo); }
html[data-skin="editorial"] .philosophy__card:nth-child(3) .philosophy__icon { background: rgba(242,201,76,0.16);  color: var(--ed-gold); }
html[data-skin="editorial"] .philosophy__card:nth-child(4) .philosophy__icon { background: rgba(255,122,110,0.12); color: var(--ed-coral); }

/* ---- Quotes: magazine pull-quote treatment ---- */
html[data-skin="editorial"] .voice { position: relative; background: transparent; border: none; padding: 1.7rem 0 0; box-shadow: none; }
html[data-skin="editorial"] .voice::before {
  content: '\201C'; position: absolute; top: -0.18em; left: -0.04em;
  font-family: var(--serif); font-weight: 600; font-size: 3.6rem; line-height: 1;
  color: var(--accent-1); opacity: 0.5;
}
html[data-skin="editorial"] .voice__quote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: calc(var(--fs-base) * 1.16); line-height: 1.45; color: var(--text-primary);
}
html[data-skin="editorial"] .voice__by {
  font-style: normal; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: var(--fs-xs); color: var(--text-tertiary); margin-top: 0.9rem;
}

/* ---- Journey: color motifs reinforce progression (no green) ---- */
html[data-skin="editorial"] .journey__step:nth-child(1) .journey__dot { border-color: var(--ed-peri); }
html[data-skin="editorial"] .journey__step:nth-child(1) .journey__dot::after { background: var(--ed-peri); }
html[data-skin="editorial"] .journey__step:nth-child(2) .journey__dot { border-color: var(--ed-indigo); }
html[data-skin="editorial"] .journey__step:nth-child(2) .journey__dot::after { background: var(--ed-indigo); }
html[data-skin="editorial"] .journey__step:nth-child(3) .journey__dot { border-color: var(--ed-coral); }
html[data-skin="editorial"] .journey__step:nth-child(3) .journey__dot::after { background: var(--ed-coral); }
html[data-skin="editorial"] .journey__step:nth-child(4) .journey__dot { border-color: var(--ed-gold); }
html[data-skin="editorial"] .journey__step:nth-child(4) .journey__dot::after { background: var(--ed-gold); }
html[data-skin="editorial"] .journey__node:hover .journey__dot { box-shadow: 0 0 0 6px rgba(109,124,255,0.14); }

/* ---- Restraint: no large ambient color glows behind content/imagery ---- */
html[data-skin="editorial"] .bg__gradient,
html[data-skin="editorial"] .hero__gradient,
html[data-skin="editorial"] .cs-hero__gradient { opacity: 0.04; }

/* ---- AI guide: a quiet periwinkle focus, no cyan ---- */
html[data-skin="editorial"] .composer__box:focus-within { border-color: var(--accent-1); box-shadow: 0 0 0 4px rgba(109,124,255,0.18); }
html[data-skin="editorial"] .response__avatar { background: rgba(109,124,255,0.16); color: var(--accent-1); }
html[data-skin="editorial"] .answer a { border-bottom-color: rgba(109,124,255,0.4); }
html[data-skin="editorial"] .chip__spark { color: var(--accent-3); }

/* ---- Case studies: serif headers, semantic accent dot stays ---- */
html[data-skin="editorial"] .cs-section__label::before { border-radius: 50%; }

/* ---- Work cards: no dark purple in the cream skin. Each visual panel gets a soft wash of its semantic color ---- */
html[data-skin="editorial"] .case-card--welcome .case-card__visual { background: linear-gradient(135deg, #ECECFB, #DCDCF6); }      /* periwinkle / identity */
html[data-skin="editorial"] .case-card--search .case-card__visual { background: linear-gradient(135deg, #EBF1DF, #DBE5C6); }       /* sage / discovery */
html[data-skin="editorial"] .case-card--agentforce .case-card__visual { background: linear-gradient(135deg, #FDE8E5, #FBD5CF); }  /* coral / collaboration */
html[data-skin="editorial"] .case-card--clientapps .case-card__visual { background: linear-gradient(135deg, #FBF1D8, #F6E4BC); }  /* gold / creation */
html[data-skin="editorial"] .case-card--automation .case-card__visual { background: linear-gradient(135deg, #E9E7F8, #D7D2EE); }  /* indigo-periwinkle / trust */

/* ---- Detail cards: crisp paper, not dated tan, against the darker cream ---- */
html[data-skin="editorial"] .about__detail { background: var(--surface-1); }

/* iOS safe-area: fixed nav fills the top inset opaquely so page content can't scroll into the status-bar / address-bar gap (all skins). */
.nav { padding-top: calc(var(--space-sm) + env(safe-area-inset-top, 0px)); }
