/*
Theme Name: callfriend
Theme URI: https://callfriend.net
Author: callfriend
Description: Classic PHP theme for callfriend — a real person on the other side of the screen, ready to listen for an hour.
Version: 1.0
License: All Rights Reserved
Text Domain: callfriend
*/

/* callfriend — site styles
   Values taken verbatim from the Claude Design source
   (`Friend Today - Home.dc.html`, `Privacy Policy.dc.html`).

   The `brand:` comments below are the Dear Friend · Quiet Hour style guide's
   values, which the canvas designs drifted from — see BRAND.md for the full
   comparison. Swapping a token here is all it takes to adopt the guide. */

:root {
  --primary: #1A150F;
  --accent: #E5C15C;      /* brand: #B0723A Ember Amber */
  --accent-soft: #F4E3B0; /* brand: #EAD6B4 Soft Ember */
  --text: #23201B;        /* brand: #241E17 Warm Charcoal */
  --muted: #6B6459;       /* brand: #6E6252 Taupe Grey */
  --subtle: #A6A093;      /* brand: #A79A87 Sand Grey */
  --border: #E4DED1;      /* brand: #E1D5C1 Pale Sand */
  --surface: #F3EDE2;
  --base: #F8F4EC;
  --card: #FDFBF7;
  --logo: #A6821F;
  --danger: #B3402C;

  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --display: 'Playfair Display', serif;

  --measure: 1100px;
  --gutter: 24px;
  --story-sticky-offset: 50px;

  /* Shared type scale from the design's clamp() values. */
  --body: clamp(17px, 1.35vw, 19.5px);
  --h2: clamp(28px, 3.4vw, 38px);
}

/* Self-hosted — see BRAND.md/migration plan for why: no Google Fonts CDN
   request, which is also an IP-transmission problem under GDPR (LG München I,
   3 O 17493/20). Only the one family/style/weight the site actually uses. */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/playfair-display-italic-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/playfair-display-italic-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/playfair-display-italic-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  background: var(--base);
}

body {
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); }
a:hover { color: var(--primary); }

input,
textarea,
button {
  font: inherit;
  color: inherit;
}

/* Page shell ------------------------------------------------------------- */

.page {
  min-height: 100vh;
  padding: 0 var(--gutter);
}

.shell {
  max-width: var(--measure);
  margin: 0 auto;
}

/* Full-bleed band that breaks out of the page gutter. */
.band {
  background: var(--surface);
  margin: 0 calc(-1 * var(--gutter));
  padding: clamp(90px, 13vh, 140px) var(--gutter);
}

.h2 {
  margin: 0 0 28px;
  font-weight: 400;
  font-size: var(--h2);
  line-height: 1.2;
  color: var(--primary);
}

.lead {
  font-size: var(--body);
  line-height: 1.7;
  text-wrap: pretty;
}

.link-gold {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

/* Header ----------------------------------------------------------------- */

.site-header {
  padding: 38px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: baseline;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--logo);
}

.site-nav__list {
  display: flex;
  gap: 28px;
  align-items: baseline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 17px;
  text-decoration: none;
  color: var(--text);
}

/* Hero ------------------------------------------------------------------- */

.hero {
  padding: clamp(90px, 15vh, 180px) 0 clamp(110px, 16vh, 170px);
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-weight: 400;
  font-size: clamp(40px, 7.4vw, 84px);
  line-height: 1.05;
  color: var(--primary);
}

/* Who is this for? ------------------------------------------------------- */

.audience {
  padding: 0 0 clamp(100px, 14vh, 150px);
}

.audience__body {
  max-width: 620px;
}

.audience__body p {
  margin: 0 0 1.3em;
}

.audience__body p:last-child {
  margin-bottom: 0;
}

/* About ------------------------------------------------------------------ */

.about {
  padding: 0 0 clamp(100px, 15vh, 160px);
  scroll-margin-top: clamp(24px, 6vh, 48px);
}

.about__row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: flex-start;
}

.about__portrait {
  flex: 0 1 380px;
  min-width: 260px;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.85) sepia(0.06);
}

.about__text {
  flex: 1 1 380px;
  min-width: 280px;
  max-width: 560px;
  padding-top: clamp(0px, 6vw, 84px);
}

.about__text p {
  margin: 0;
}

/* Story ------------------------------------------------------------------ */

.story {
  padding: 0 0 clamp(100px, 14vh, 150px);
  scroll-margin-top: clamp(24px, 6vh, 48px);
}

.story__lede {
  margin: 0 0 clamp(44px, 6vh, 64px);
  max-width: 620px;
  color: var(--muted);
}

.story__lede-highlight {
  color: #a6821f;
}

/* Base (and no-JS) layout: one column, clips interleaved with the text. */
.story__flow {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 56px);
}

.story__text {
  margin: 0;
  max-width: 620px;
}

.story__clip {
  aspect-ratio: 9 / 16;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface);
}

/* Wide viewports: main.js splits the flow into a sticky text column plus a
   240px clip rail, matching the design's `isDesktop` branch. */
.story__flow.is-split {
  flex-direction: row;
  gap: clamp(28px, 3.4vw, 56px);
}

.story__column {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: var(--story-sticky-offset);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.story__column.is-tall {
  position: sticky;
}

.story__clips {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 56px);
}

/* Without JS, keep the clips at rail width instead of stretching to 1100px. */
@media (min-width: 861px) {
  .story__flow:not(.is-split) .story__clip {
    max-width: 240px;
  }
}

/* What I believe --------------------------------------------------------- */

.beliefs {
  padding: 0 0 clamp(100px, 15vh, 160px);
}

.beliefs .h2 {
  margin-bottom: clamp(40px, 6vh, 60px);
}

.beliefs p {
  margin: 0 0 0 clamp(0px, 6vw, 110px);
  max-width: 700px;
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.55;
  color: var(--primary);
  text-wrap: pretty;
}

/* Where are you going? -------------------------------------------------- */

.reach p {
  margin: 0 0 clamp(48px, 7vh, 72px);
  max-width: 620px;
}

.reach__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Book a meeting -------------------------------------------------------- */

.book {
  /* Section padding plus the design's trailing spacer block. */
  padding: clamp(100px, 15vh, 160px) 0
           calc(clamp(90px, 12vh, 130px) + clamp(70px, 10vh, 120px));
  scroll-margin-top: clamp(24px, 6vh, 48px);
}

.book .h2 {
  margin-bottom: 26px;
}

.book__intro {
  margin: 0 0 clamp(48px, 6vh, 64px);
  max-width: 620px;
}

.book__form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* Offscreen rather than display:none — bots skip display:none more often. */
.cf-hp {
  position: absolute;
  left: -9999px;
  margin: 0;
}

.book__success,
.book__error {
  max-width: 560px;
  font-size: var(--body);
  line-height: 1.7;
}

.book__error {
  color: var(--danger);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field > span {
  font-size: 15px;
  color: var(--muted);
}

.field__required {
  color: var(--logo);
}

.field .field__error {
  display: none;
  font-size: 13px;
  color: var(--danger);
}

.field.has-error .field__error {
  display: block;
}

.field input,
.field textarea {
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 10px 2px;
  font-size: 18px;
  font-family: inherit;
  outline: none;
  border-radius: 0;
}

.field.has-error input,
.field.has-error textarea {
  border-bottom-color: var(--danger);
}

.field input {
  min-height: 44px;
}

.field textarea {
  line-height: 1.6;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--primary);
}

.book__submit {
  align-self: flex-start;
  margin-top: 6px;
  color: var(--primary);
  background-color: var(--accent);
  border: 0;
  border-radius: 3px;
  padding: 14px 34px;
  font-size: 17px;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
}

.book__submit:hover {
  background-color: var(--accent-soft);
}

/* Long-form content (Privacy Policy, General Terms) ---------------------- */

.legal {
  padding: clamp(70px, 11vh, 110px) 0 clamp(100px, 14vh, 140px);
}

.prose {
  max-width: 700px;
}

.prose h1 {
  margin: 0 0 0.9em;
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 44px);
  line-height: 1.15;
  color: var(--primary);
}

.prose h2 {
  margin: 0 0 0.6em;
  font-weight: 400;
  font-size: 22px;
  color: var(--primary);
}

.prose p {
  margin: 0 0 1.6em;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}

.prose ul {
  margin: 0 0 1.6em;
  padding-left: 1.2em;
}

.prose li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  text-wrap: pretty;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding: 0 0 60px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  padding-top: 26px;
  font-size: 14.5px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
