/* ==========================================================================
   D’oba — base: fonts, tokens, reset, typography, layout, utilities
   ========================================================================== */

/* Fonts (self-hosted, SIL OFL). The brand faces Roca and Felt Tip Woman are listed first in
   each stack: if licensed webfont files are added (see README), they take over automatically. */
@font-face {
	font-family: "Fraunces";
	src: url("../fonts/fraunces-normal-latin.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
	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: "Fraunces";
	src: url("../fonts/fraunces-normal-latin-ext.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
	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: "Fraunces";
	src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
	font-weight: 400 900;
	font-style: italic;
	font-display: swap;
	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: "Fraunces";
	src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2");
	font-weight: 400 900;
	font-style: italic;
	font-display: swap;
	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: "Nata Sans";
	src: url("../fonts/nata-sans-normal-latin.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	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: "Nata Sans";
	src: url("../fonts/nata-sans-normal-latin-ext.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	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: "Gochi Hand";
	src: url("../fonts/gochi-hand-normal-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Brand palette (sampled from the D’oba brand colour sheet) */
	--c-cream: #f3e2d0;
	--c-paper: #f4eae1;
	--c-pink: #c6749c;
	--c-pink-soft: #e7a9c8;
	--c-pink-deep: #9b4671;
	--c-brown: #672c26;
	--c-brown-deep: #8e3528;
	--c-purple: #725b8c;
	--c-coral: #c75e3e;
	--c-coral-deep: #a84a2c;
	--c-ink: #2a1610;
	--c-green: #518965;
	--c-green-deep: #3b6a4c;
	--c-white: #fffaf5;

	--c-text: var(--c-ink);
	--c-focus: #2a1610;

	/* Type */
	--f-display: "Roca", "Fraunces", "Iowan Old Style", Georgia, serif;
	--f-body: "Nata Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	--f-hand: "Felt Tip Woman", "Gochi Hand", "Comic Neue", cursive;

	--fs-xs: 0.8125rem;
	--fs-sm: 0.9375rem;
	--fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
	--fs-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
	--fs-h3: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
	--fs-h2: clamp(2.125rem, 1.55rem + 2.6vw, 3.75rem);
	--fs-h1: clamp(2.75rem, 1.7rem + 4.6vw, 6.25rem);

	/* Space & layout */
	--gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
	--container: 1320px;
	--container-narrow: 760px;
	--section-y: clamp(4rem, 2.6rem + 6vw, 8.5rem);
	--header-h: 76px;
	--band-h: clamp(34px, 1.9rem + 1vw, 50px);

	/* Organic shapes */
	--r-blob: 48% 52% 50% 50% / 62% 58% 42% 38%;
	--r-blob-alt: 52% 48% 46% 54% / 40% 60% 40% 60%;
	--r-pill: 60px 70px 64px 54px / 40px 48px 36px 44px; /* organic pill for wide elements */
	--r-pill-alt: 70px 56px 60px 66px / 46px 36px 44px 38px;
	--r-card: 30px 38px 34px 28px / 34px 28px 38px 30px;
	--r-soft: 22px 28px 24px 26px / 26px 22px 28px 24px;

	--ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
	--ease-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
	--shadow-soft: 0 18px 40px -22px rgba(42, 22, 16, 0.45);
}

@media (min-width: 1024px) {
	:root {
		--header-h: 88px;
	}
}

/* Reset ------------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-text);
	font-family: var(--f-body);
	font-size: var(--fs-base);
	line-height: 1.6;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
	margin: 0;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

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

button {
	cursor: pointer;
}

address {
	font-style: normal;
}

::selection {
	background: var(--c-pink);
	color: var(--c-ink);
}

/* Typography ------------------------------------------------------------- */
.display,
h1,
h2,
h3 {
	font-family: var(--f-display);
	font-weight: 650;
	font-variation-settings: "SOFT" 100, "WONK" 0;
	font-optical-sizing: auto;
	line-height: 1;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.display {
	text-transform: uppercase;
}

.display em,
.display i {
	font-style: italic;
	font-weight: 700;
}

p {
	text-wrap: pretty;
}

.hand {
	font-family: var(--f-hand);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	transform: rotate(var(--rot, 0deg));
}

.kicker {
	font-size: var(--fs-xl);
	display: inline-block;
	margin-bottom: 0.5rem;
}

.section-title {
	font-size: var(--fs-h2);
	text-align: center;
}

/* Layout ----------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
	padding-block: var(--section-y);
}

.site-main {
	display: block;
	outline: none;
}

/* Sections are block formatting contexts so overlapping pattern bands never collapse margins. */
.site-main > section,
.site-main > article {
	display: flow-root;
	position: relative;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
}

/* Accessibility ---------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--c-ink);
	color: var(--c-cream);
	font-weight: 600;
	border-radius: 999px;
	transform: translateY(-160%);
	transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
	transform: none;
}

:focus-visible {
	outline: 3px solid var(--c-focus);
	outline-offset: 3px;
}

/* Dark surfaces use a cream focus ring */
.what-is :focus-visible,
.prepare :focus-visible,
.site-footer :focus-visible,
.drawer :focus-visible,
.inside :focus-visible,
.site-header--light:not(.is-scrolled) :focus-visible,
.shop-hero :focus-visible,
.story-hero :focus-visible,
.find-hero :focus-visible,
.flavour-hero :focus-visible,
.stockists :focus-visible {
	--c-focus: var(--c-cream);
}

/* Motion ----------------------------------------------------------------- */
.js [data-reveal] {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out);
	transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}

	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}
