/* =====================================================================
   Grace and Bread — site styles
   Same layout, fonts, and section themes as the Squarespace site,
   with colors taken from the new logo.
   ===================================================================== */

/* ---------------------------------------------------------------------
   PALETTE — these five values drive every color on the site.
   Active: colors from the new logo.
   The old Squarespace colors, if you ever want them back:
     --black: #655A3F; --accent: #FBE19F; --light-accent: #FFF5D9; --dark-accent: #FFCF5A;
   --------------------------------------------------------------------- */
:root {
  --white: #FFFFFF;
  --black: #241C19;          /* logo ink */
  --accent: #E8D9C4;         /* logo cream */
  --light-accent: #F5EEE3;
  --dark-accent: #AE9169;    /* logo gold */
}

@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans.woff2") format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-italic.woff2") format("woff2"); font-weight: 200 1000; font-style: italic; font-display: swap; }

:root {
  --heading-font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --body-font: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --max: 1400px;
  --gutter: 4vw;
  --section-pad: clamp(3.5rem, 7vw, 6.5rem);
  --h1: clamp(2.5rem, 1.4rem + 3.3vw, 4.25rem);
  --h2: clamp(2rem, 1.35rem + 1.9vw, 3.1rem);
  --h3: clamp(1.4rem, 1.1rem + 0.9vw, 1.85rem);
  --h4: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  --p: 1.0625rem;
  --p-large: clamp(1.2rem, 1.05rem + 0.4vw, 1.4rem);

  /* default (white) section theme */
  --bg: var(--white); --text: var(--black);
  --btn-bg: var(--black); --btn-text: var(--white);
  --outline: var(--black); --field-bg: var(--light-accent);
}
[data-theme="black"] {
  --bg: var(--black); --text: var(--white);
  --btn-bg: var(--accent); --btn-text: var(--black);
  --outline: var(--accent); --field-bg: var(--white);
}
[data-theme="bright-inverse"] {
  --bg: var(--accent); --text: var(--black);
  --btn-bg: var(--black); --btn-text: var(--white);
  --outline: var(--black); --field-bg: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--black);
  font-family: var(--body-font); font-size: var(--p); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4, .h2 {
  font-family: var(--heading-font); font-weight: 500;
  line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 0 0.6em; color: var(--text); text-wrap: balance;
}
h1 { font-size: var(--h1); line-height: 1.06; }
h2, .h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.large { font-size: var(--p-large); line-height: 1.5; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { opacity: 0.8; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { background: var(--bg); color: var(--text); padding-block: var(--section-pad); }
.under-header { padding-top: calc(var(--header-h, 13rem) + var(--section-pad)); }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: var(--black); color: var(--white); padding: .7rem 1.2rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 400 1rem/1.2 var(--body-font); text-transform: uppercase; letter-spacing: 0.03em;
  padding: 1em 1.9em; border: 2px solid var(--btn-bg); border-radius: 999px;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: opacity .15s ease;
}
.btn:hover { opacity: .8; }
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--secondary { background: transparent; color: var(--outline); border-color: var(--outline); }
.btn--tertiary { background: transparent; color: var(--outline); border-color: var(--outline); border-radius: 1.1em 0; padding: .7em 1.4em; font-size: .85rem; }
.btn--large { padding: 1.3em 4.5em; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ------------------------------------------------------------- header */
/* Sits over the top of each page and fades from white to clear, like the old site */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--white), rgba(255, 255, 255, 0)); opacity: .85;
  box-shadow: 0 12px 12px -6px rgba(36, 28, 25, .12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 3vw; }
.site-logo img { width: clamp(240px, 34vw, 562px); height: auto; }
.header-right { display: flex; align-items: center; gap: 1.5rem; }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { font-size: 1rem; text-decoration: none; color: var(--black); white-space: nowrap; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .4em; text-decoration-thickness: 1px; }
.social { display: flex; gap: .75rem; }
.icon-link { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--black); color: var(--white); }
.icon-link svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.menu-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--black); }
.menu-toggle span { display: block; width: 28px; height: 2px; background: currentColor; margin: 6px 0; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 50; background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  padding: 2rem var(--gutter); animation: fade .25s ease;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.mobile-menu nav a { font: 500 1.9rem/1.3 var(--heading-font); text-decoration: none; }
.mobile-menu .icon-link { width: 3rem; height: 3rem; }
.menu-close { position: absolute; top: 1.25rem; right: var(--gutter); background: none; border: 0; font-size: 2.4rem; line-height: 1; cursor: pointer; color: var(--black); }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 1199px) {
  .header-right { display: none; }
  .menu-toggle { display: block; }
  .site-logo img { width: min(58vw, 380px); }
  .header-inner { padding-block: 4vw; }
}

/* --------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--text); }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.hero .container {
  min-height: clamp(42rem, 64vw, 60rem); display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: var(--header-h, 13rem); padding-bottom: clamp(3rem, 7vw, 6rem);
}
.hero-copy { max-width: 44rem; }
.hero-copy .large { margin-bottom: 1.5rem; }

.center-col { max-width: 44rem; margin-inline: auto; text-align: center; }
.center-col h4 { margin-bottom: 2.25rem; }

/* ---------------------------------------------------------- newsletter */
.newsletter-archive { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.newsletter-block { max-width: 60rem; margin-inline: auto; text-align: center; }
.newsletter-block h2 { margin-bottom: .35em; }
.newsletter-block > p { margin-bottom: 1.75rem; }
.form-inline { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr 1.4fr auto; }
@media (max-width: 767px) {
  .form-inline { grid-template-columns: 1fr 1fr; }
  .form-inline .field--email, .form-inline .btn { grid-column: 1 / -1; }
  .newsletter-archive { justify-content: center; }
}

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: .35rem; text-align: left; }
.field label, .field legend { font-size: .95rem; color: var(--text); }
.field .req { opacity: .65; font-size: .85em; }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--black);
  background: var(--field-bg); border: 0; border-radius: 999px; padding: .95rem 1.3rem; width: 100%;
}
.field textarea { border-radius: 1.5rem; min-height: 8.5rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--black); opacity: .55; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--dark-accent); outline-offset: 1px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: .5rem; }
.name-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.name-pair label { font-size: .85rem; }
.form-stack { display: grid; gap: 1.1rem; }
.form-stack .btn { justify-self: start; }
.form__hp { position: absolute; left: -9999px; }
.form__status { margin: .75rem 0 0; min-height: 1.4em; }
.form__status[data-state="error"] { font-weight: 700; }
.form__done { font: 500 var(--h3)/1.3 var(--heading-font); margin: 0; }
.form__done small { display: block; margin-top: .5rem; font: 400 1rem/1.5 var(--body-font); }
[hidden] { display: none !important; }

/* ------------------------------------------------ two-column page rows */
.rows { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.row { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.row > :first-child { margin: 0; }
.row-body { max-width: 48rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 767px) { .row, .split { grid-template-columns: 1fr; } }

/* About: gradient that drifts toward the cursor, as on the old site */
.about-gradient { --gx: 50%; --gy: 40%; background: radial-gradient(70% 70% at var(--gx) var(--gy), var(--light-accent), var(--accent)); }
.founders { display: flex; justify-content: center; gap: clamp(2rem, 7vw, 5.5rem); }
.founder { margin: 0; text-align: center; width: clamp(150px, 13vw, 190px); }
.founder img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--light-accent); }
.founder figcaption { margin-top: .8rem; }
.verse-quote { font-style: italic; margin-top: 1.5rem; }
.verse-ref { font-weight: 700; padding-left: 2.5rem; }
.values { margin: 0; padding-left: 1.3rem; }
.values > li { margin-bottom: .9rem; }
.values ul { margin: .25rem 0 0; padding-left: 1.3rem; list-style: circle; }

.aside-cta { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--accent); }
.aside-cta .btn { margin-top: .5rem; }

/* ------------------------------------------------------------- podcast */
.podcast-hero { padding: var(--header-h, 13rem) 0 var(--gutter); background: var(--white); }
.podcast-panel {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(100% - 2 * var(--gutter), var(--max) + 2 * var(--gutter)); margin-inline: auto;
  padding: clamp(2.5rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 5vw, 4.5rem);
}
.podcast-panel .hero-overlay { background: var(--white); opacity: .8; }
.podcast-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.podcast-embed iframe { width: 100%; height: 352px; border: 0; border-radius: 12px; }
.badges-title { margin-top: clamp(2.5rem, 5vw, 4rem); font-weight: 700; }
.badges { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem clamp(1rem, 2vw, 2rem); max-width: 44rem; }
.badges li { grid-column: span 2; }
.badges li:nth-child(4) { grid-column: 2 / span 2; }
.badges img { width: 100%; height: auto; }
@media (max-width: 767px) {
  .podcast-top { grid-template-columns: 1fr; }
  .badges { grid-template-columns: 1fr 1fr; max-width: 26rem; }
  .badges li, .badges li:nth-child(4) { grid-column: auto; }
}

/* -------------------------------------------------------------- footer */
.site-footer { padding-block: clamp(3rem, 5vw, 4.5rem); background: var(--white); color: var(--black); }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.footer-info h3 { margin-bottom: .5rem; }
.footer-info p { margin: 0 0 .35rem; font-size: .95rem; }
.footer-nav { display: flex; flex-direction: column; gap: .3rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.footer-actions .icon-link { background: none; color: var(--black); width: 2.2rem; height: 2.2rem; }
.footer-actions .icon-link svg { width: 1.35rem; height: 1.35rem; }
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-info { grid-column: 1 / -1; order: 3; }
}

.page-message { text-align: center; max-width: 36rem; margin-inline: auto; }
.page-message p { margin-bottom: 2rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
