/* The Second Chapter Foundation — shared styles.
   Colors and fonts come from theme.json presets, so changing them in
   Site Editor > Styles updates everything here too. */

:root {
	--sc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--sc-line: rgba(61, 46, 40, 0.25);
	--sc-input-border: rgba(61, 46, 40, 0.28);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main [id], .wp-site-blocks [id] { scroll-margin-top: 96px; }
.wp-site-blocks { padding-top: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main > .entry-content > * + *, .wp-block-post-content > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.sc-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(253, 250, 247, 0.95);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 240ms var(--sc-ease);
}
.admin-bar .sc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sc-header { top: 46px; } }
.sc-header.is-scrolled { border-bottom-color: rgba(61, 46, 40, 0.12); }
.sc-header .wp-block-navigation-item__content { font-weight: 600; padding: 8px 10px; border-radius: 10px; transition: background 160ms var(--sc-ease); }
.sc-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--dark-brown); }
.sc-header .wp-block-navigation { gap: 4px; }
.sc-logo { line-height: 1; }
.sc-logo a { text-decoration: none; color: inherit; }
.sc-logo .sc-logo-name { display: block; font-family: var(--wp--preset--font-family--young-serif); font-size: 26px; }
.sc-logo .sc-logo-sub { display: block; font-weight: 700; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; margin-top: 5px; }

/* ---------- Handwritten note (paragraph style) ---------- */
.is-style-handwritten {
	font-family: var(--wp--preset--font-family--caveat) !important;
	font-weight: 700; line-height: 1.1;
	color: var(--wp--preset--color--terracotta-deep);
	display: inline-block; width: fit-content; max-width: 100%;
	transform: rotate(-3deg); transform-origin: left center;
}
.is-style-handwritten:not([class*="-font-size"]) { font-size: 30px; }
.is-style-handwritten.has-text-align-right { transform-origin: right center; }
p.is-style-handwritten { margin-block: 0; }

/* ---------- Cards (group styles) ---------- */
.is-style-cream-card { background: var(--wp--preset--color--cream); border-radius: 24px; }
.is-style-white-card { background: var(--wp--preset--color--warm-white); border-radius: 24px; }
.is-style-outline-card { border: 2px solid var(--wp--preset--color--blush); border-radius: 24px; }
.is-style-cream-card:not([style*="padding"]),
.is-style-white-card:not([style*="padding"]),
.is-style-outline-card:not([style*="padding"]) { padding: 32px; }

.is-style-snapshot {
	background: var(--wp--preset--color--warm-white);
	border-radius: 8px; padding: 12px 12px 22px !important;
	box-shadow: 0 6px 20px rgba(61, 46, 40, 0.12);
	transform: rotate(-1.5deg);
	transition: transform 240ms var(--sc-ease);
}
.is-style-snapshot:nth-child(4n+2) { transform: rotate(1deg); }
.is-style-snapshot:nth-child(4n+3) { transform: rotate(-0.8deg); }
.is-style-snapshot:nth-child(4n+4) { transform: rotate(1.4deg); }
.is-style-snapshot:hover { transform: rotate(0deg) translateY(-3px); }
.is-style-snapshot .wp-block-image, .is-style-snapshot figure { margin: 0; }
.is-style-snapshot img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; border-radius: 2px !important; display: block; }
.is-style-snapshot h3, .is-style-snapshot h4, .is-style-snapshot .sc-snap-title {
	font-family: var(--wp--preset--font-family--caveat); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: 0; margin: 0;
}
@media (prefers-reduced-motion: reduce) { .is-style-snapshot, .is-style-snapshot:hover { transition: none; } }

/* ---------- Lists with terracotta dots ---------- */
.is-style-dots { list-style: none; padding-left: 0 !important; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.is-style-dots li { position: relative; padding-left: 19px; line-height: 1.5; }
.is-style-dots li::before {
	content: ""; position: absolute; left: 0; top: 0.62em;
	width: 7px; height: 7px; border-radius: 999px; background: var(--wp--preset--color--terracotta);
}
.is-style-dots strong { font-weight: 800; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background 160ms var(--sc-ease), color 160ms var(--sc-ease), border-color 160ms var(--sc-ease); }
.wp-block-button.is-style-dark .wp-block-button__link { background: var(--wp--preset--color--dark-brown); border-color: var(--wp--preset--color--dark-brown); color: var(--wp--preset--color--warm-white); }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: var(--wp--preset--color--dark-brown-hover); border-color: var(--wp--preset--color--dark-brown-hover); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--dark-brown); border: 2px solid var(--wp--preset--color--dark-brown); padding: 16px 24px; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--cream); }

.wp-block-button.is-style-choice, .wp-block-button.is-style-choice-dark { width: 100%; }
.wp-block-button.is-style-choice .wp-block-button__link,
.wp-block-button.is-style-choice-dark .wp-block-button__link {
	display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%;
	border-radius: 18px; padding: 22px 26px; font-size: 19px; font-weight: 800; text-align: left;
}
.wp-block-button.is-style-choice .wp-block-button__link::after,
.wp-block-button.is-style-choice-dark .wp-block-button__link::after { content: "\2192"; }
.wp-block-button.is-style-choice-dark .wp-block-button__link { background: var(--wp--preset--color--dark-brown); border-color: var(--wp--preset--color--dark-brown); color: var(--wp--preset--color--warm-white); }
.wp-block-button.is-style-choice-dark .wp-block-button__link:hover { background: var(--wp--preset--color--dark-brown-hover); border-color: var(--wp--preset--color--dark-brown-hover); }
.sc-header .wp-block-button__link { padding: 12px 20px; font-size: 16px; margin-left: 8px; white-space: nowrap; }

/* ---------- Hero ---------- */
.sc-hero { padding: 8px clamp(12px, 2.5vw, 32px) 0 !important; }
.sc-hero .sc-hero-photo { margin: 0; height: clamp(360px, 62vh, 600px); border-radius: 32px; overflow: hidden; }
.sc-hero .sc-hero-photo img { width: 100%; height: 100% !important; object-fit: cover; border-radius: 32px !important; }
.sc-hero .sc-hero-card {
	position: relative; max-width: 1120px; margin: -140px auto 0 !important;
	width: calc(100% - clamp(24px, 8vw, 112px));
	box-shadow: 0 18px 40px rgba(61, 46, 40, 0.10);
	border-radius: 28px;
	padding: clamp(28px, 5vw, 52px) clamp(24px, 5vw, 56px) !important;
}
.sc-hero .sc-hero-card h1 { text-wrap: balance; }
.sc-hero .sc-choices { position: relative; padding-top: 28px; }
.sc-hero .sc-choices > .is-style-handwritten { position: absolute; top: -14px; left: 8px; transform: rotate(-4deg); }

/* ---------- Sections ---------- */
.sc-section h2 { text-wrap: balance; }
.sc-section p { text-wrap: pretty; }
.sc-heading-row { align-items: flex-end !important; }
.sc-heading-row .is-style-handwritten { align-self: flex-start; padding-bottom: 4px; }

/* Donate photo + shipping label */
.sc-bag-photo { position: relative; padding-bottom: 28px; }
.sc-bag-photo .wp-block-image { margin: 0; aspect-ratio: 5 / 4; border-radius: 24px; overflow: hidden; }
.sc-bag-photo .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.sc-label {
	position: absolute !important; right: -6px; bottom: 0; width: min(300px, 78%); margin: 0 !important;
	background: var(--wp--preset--color--warm-white); border: 1px solid rgba(61, 46, 40, 0.2); border-radius: 6px;
	box-shadow: 0 10px 26px rgba(61, 46, 40, 0.14); padding: 18px 20px !important;
	font-family: ui-monospace, Menlo, monospace !important; font-size: 11px; line-height: 1.5; color: var(--wp--preset--color--dark-brown);
	transform: rotate(-3deg);
}
.sc-label * { font-family: inherit !important; }
.sc-label p { margin: 0 !important; font-size: 11px; line-height: 1.5; }
.sc-label .sc-label-top { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--wp--preset--color--dark-brown); padding-bottom: 8px; margin-bottom: 12px !important; font-weight: 700; letter-spacing: 0.06em; }
.sc-label .sc-label-top p { font-weight: 700; }
.sc-label .sc-label-dim { opacity: 0.7; }
.sc-label strong { font-size: 14px; }
.sc-label .sc-label-bars { margin-top: 12px !important; height: 40px !important; background: repeating-linear-gradient(90deg, #3D2E28 0 2px, transparent 2px 4px, #3D2E28 4px 5px, transparent 5px 8px, #3D2E28 8px 11px, transparent 11px 13px); }
.sc-big-value { font-family: var(--wp--preset--font-family--young-serif); font-size: 30px; line-height: 1.1; color: var(--wp--preset--color--terracotta); }

/* Dashed divider inside cards */
.sc-dashed-top { border-top: 1.5px dashed var(--sc-line); padding-top: 16px; }

/* Status pill (Get clothes) */
.sc-status-pill {
	display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
	background: var(--wp--preset--color--cream); font-weight: 700; font-size: 15px; color: var(--wp--preset--color--dark-brown);
	width: fit-content;
}
.sc-status-pill .sc-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--wp--preset--color--olive); flex: none; }
.sc-status-pill.is-paused .sc-dot { background: var(--wp--preset--color--terracotta); }
.sc-tag {
	display: inline-block; width: fit-content; font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--wp--preset--color--warm-white); background: var(--wp--preset--color--dark-brown); border-radius: 999px; padding: 7px 14px;
}

/* Founder */
.sc-founder-photo { margin: 0; max-width: 480px; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; }
.sc-founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.sc-signature { font-family: var(--wp--preset--font-family--caveat); font-weight: 700; font-size: 44px; line-height: 1; }

/* Partner card title link */
.sc-card-link-title a { color: var(--wp--preset--color--dark-brown); text-decoration: underline; text-decoration-color: var(--wp--preset--color--terracotta); text-underline-offset: 4px; }
.sc-card-link-title a:hover { color: var(--wp--preset--color--terracotta-deep); }
.sc-more-link a { font-weight: 800; text-decoration: underline; }

/* ---------- FAQ (Details block) ---------- */
.sc-faq .wp-block-details { background: var(--wp--preset--color--warm-white); border-radius: 18px; padding: 0; margin: 0; }
.sc-faq .wp-block-details summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
	padding: 22px 24px; font-family: var(--wp--preset--font-family--young-serif); font-size: 22px; line-height: 1.25;
}
.sc-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.sc-faq .wp-block-details summary::after {
	content: "+"; flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--wp--preset--color--cream);
	display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--nunito-sans);
	font-size: 20px; font-weight: 700; transition: transform 240ms var(--sc-ease);
}
.sc-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.sc-faq .wp-block-details > :not(summary) { margin: 0; padding: 0 72px 24px 24px; font-size: 17px; line-height: 1.65; max-width: 68ch; }
.sc-faq .wp-block-details summary:focus-visible { outline: 2px solid var(--wp--preset--color--terracotta); outline-offset: 2px; border-radius: 18px; }

/* Collapsible donation-bag form (Details block with class sc-collapsible).
   Title = summary text; the italic part of the summary is the small line under it. */
.sc-collapsible { margin: 0; }
.sc-collapsible > summary {
	list-style: none; cursor: pointer; position: relative; display: block;
	padding-right: 150px; min-height: 52px;
	font-family: var(--wp--preset--font-family--young-serif); font-size: var(--wp--preset--font-size--h-3); line-height: 1.15;
}
.sc-collapsible > summary::-webkit-details-marker { display: none; }
.sc-collapsible > summary em {
	display: block; margin-top: 8px; font-style: normal; font-family: var(--wp--preset--font-family--nunito-sans); font-size: 16px; line-height: 1.6;
}
.sc-collapsible > summary::after {
	content: "Start  \2304"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
	background: var(--wp--preset--color--terracotta); color: var(--wp--preset--color--warm-white);
	border-radius: 14px; padding: 14px 20px; font-family: var(--wp--preset--font-family--nunito-sans);
	font-weight: 700; font-size: 18px; line-height: 1.2; white-space: pre; transition: background 160ms var(--sc-ease);
}
.sc-collapsible[open] > summary::after { content: "Close  \2303"; }
.sc-collapsible > summary:hover::after { background: var(--wp--preset--color--terracotta-deep); }
.sc-collapsible > summary:focus-visible { outline: 2px solid var(--wp--preset--color--terracotta); outline-offset: 6px; border-radius: 14px; }
.sc-collapsible > :not(summary) { margin-top: 24px; }
@media (max-width: 600px) {
	.sc-collapsible > summary { padding-right: 0; }
	.sc-collapsible > summary::after { position: static; transform: none; display: inline-block; margin-top: 16px; }
}
.sc-quote { font-family: var(--wp--preset--font-family--young-serif); line-height: 1.35; }

/* ---------- Forms (DesignSetGo form builder) ---------- */
.dsgo-form-builder { --sc-field-border: rgba(61, 46, 40, 0.28); }
.dsgo-form-builder .dsgo-form-field__label,
.dsgo-form-builder .dsgo-form-field__checkbox-label { font-family: var(--wp--preset--font-family--nunito-sans); font-weight: 700; font-size: 15px; color: var(--wp--preset--color--dark-brown); }
.dsgo-form-builder .dsgo-form-field__checkbox-label { font-weight: 400; font-size: 16px; line-height: 1.5; }
.dsgo-form-builder .dsgo-form-field__required { color: var(--wp--preset--color--terracotta-deep); }
.dsgo-form-builder .dsgo-form-field__input,
.dsgo-form-builder .dsgo-form-field__textarea,
.dsgo-form-builder select {
	font-family: var(--wp--preset--font-family--nunito-sans) !important; font-size: 17px !important; font-weight: 400;
	padding: 14px 16px !important; border-radius: 14px !important;
	border: 1.5px solid var(--sc-field-border) !important;
	background: var(--wp--preset--color--warm-white) !important; color: var(--wp--preset--color--dark-brown) !important;
	width: 100%; box-sizing: border-box; min-height: 52px; height: auto;
	transition: border-color 160ms var(--sc-ease), box-shadow 160ms var(--sc-ease);
}
.dsgo-form-builder .dsgo-form-field__input:focus,
.dsgo-form-builder .dsgo-form-field__textarea:focus,
.dsgo-form-builder select:focus { border-color: var(--wp--preset--color--terracotta) !important; outline: none; box-shadow: 0 0 0 3px rgba(179, 112, 89, 0.18) !important; }
.dsgo-form-builder ::placeholder { color: rgba(61, 46, 40, 0.55); }
.dsgo-form-builder .dsgo-form-field__checkbox-input { accent-color: var(--wp--preset--color--terracotta); width: 20px; height: 20px; flex: none; }
.dsgo-form-builder .dsgo-form-field__help { font-size: 14px; line-height: 1.5; color: var(--wp--preset--color--dark-brown); opacity: 0.85; }
.dsgo-form-builder .dsgo-form-step__title { font-family: var(--wp--preset--font-family--young-serif); font-weight: 400; font-size: 24px; line-height: 1.2; margin: 0 0 4px; }
.dsgo-form-builder .dsgo-form-steps__progress { font-weight: 700; font-size: 15px; }
.dsgo-form-builder .dsgo-form-steps__back,
.dsgo-form-builder .dsgo-form-steps__next,
.dsgo-form-builder .dsgo-form__submit {
	font-family: var(--wp--preset--font-family--nunito-sans) !important; font-weight: 700 !important; font-size: 18px !important; line-height: 1.2 !important;
	border-radius: 14px !important; padding: 16px 24px !important; cursor: pointer; height: auto !important;
	transition: background 160ms var(--sc-ease), border-color 160ms var(--sc-ease), color 160ms var(--sc-ease);
}
.dsgo-form-builder .dsgo-form-steps__next,
.dsgo-form-builder .dsgo-form__submit { background: var(--wp--preset--color--terracotta) !important; color: var(--wp--preset--color--warm-white) !important; border: 2px solid var(--wp--preset--color--terracotta) !important; }
.dsgo-form-builder .dsgo-form-steps__next:hover,
.dsgo-form-builder .dsgo-form__submit:hover { background: var(--wp--preset--color--terracotta-deep) !important; border-color: var(--wp--preset--color--terracotta-deep) !important; }
.dsgo-form-builder .dsgo-form-steps__back { background: transparent !important; color: var(--wp--preset--color--dark-brown) !important; border: 2px solid var(--wp--preset--color--dark-brown) !important; }
.dsgo-form-builder .dsgo-form-steps__back:hover { background: var(--wp--preset--color--cream) !important; }
.dsgo-form-builder .dsgo-form__message { font-size: 17px; line-height: 1.65; }
.sc-form-card { border-radius: 24px; padding: clamp(24px, 5vw, 52px) !important; }
.sc-form-card.has-warm-white-background-color { box-shadow: 0 10px 30px rgba(61, 46, 40, 0.06); }

/* ---------- Footer ---------- */
.sc-footer a { color: rgba(253, 250, 247, 0.88); text-decoration: none; }
.sc-footer a:hover { color: var(--wp--preset--color--warm-white); text-decoration: underline; }
.sc-footer .sc-logo-name { font-size: 30px; }
.sc-footer .sc-logo-sub { font-size: 12px; margin-top: 6px; }
.sc-footer .is-style-handwritten { color: var(--wp--preset--color--blush); font-size: 28px; transform: rotate(-2deg); }
.sc-footer .sc-legal { border-top: 1px solid rgba(253, 250, 247, 0.16); padding-top: 24px; color: rgba(253, 250, 247, 0.78); }
.sc-footer .sc-legal a { color: rgba(253, 250, 247, 0.88); }
.sc-footer .sc-placeholder { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--wp--preset--color--blush); border: 1px dashed rgba(232, 201, 185, 0.6); border-radius: 6px; padding: 3px 8px; width: fit-content; }

/* Policy and other inner pages */
.sc-inner-page { max-width: 760px; margin: 0 auto; padding-block: clamp(56px, 7vw, 96px); }

/* Keep FAQ questions in the brand dark brown */
.sc-faq .wp-block-details summary { color: var(--wp--preset--color--dark-brown); }

/* Phones: keep logo, menu and Donate button on one row */
@media (max-width: 600px) {
	.sc-header > .wp-block-group { flex-wrap: nowrap !important; gap: 10px; }
	.sc-header .sc-logo .sc-logo-name { font-size: 20px; }
	.sc-header .sc-logo .sc-logo-sub { font-size: 9px; letter-spacing: 0.28em; }
	.sc-header .wp-block-button__link { padding: 10px 14px; font-size: 15px; margin-left: 0; }
}
