/*
Theme Name:   Lisa Wei
Theme URI:    https://www.lisawei.com/
Author:       Lisa Wei
Description:  Custom theme for lisawei.com: warm browns, Instrument Serif and Instrument Sans, shop categories, and a password-protected brand page.
Version:      0.8.5
Requires PHP: 8.1
Text Domain:  lisawei
*/

:root {
	--linen: #FAF7F3;
	--oat: #F0E6DC;
	--sand: #EADBCD;
	--tan: #DCC7B5;
	--caramel: #C49A7C;
	--cocoa: #6B4430;
	--bark: #7A5E4E;
	--umber: #4A3A31;
	--espresso: #2A1F1A;
	--line: #E3D6C8;
	--on-dark: #D9C8BA;
	--serif: 'Instrument Serif', Georgia, serif;
	--sans: 'Instrument Sans', system-ui, sans-serif;
	--wrap: 1280px;
	--gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--linen); color: var(--espresso); font-family: var(--sans); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--espresso); }
a:hover { color: var(--cocoa); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; display: inline-block; padding: 8px 16px; background: var(--espresso); color: var(--linen); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: 80px; }
.section--oat { background: var(--oat); }
.section--dark { background: var(--espresso); color: var(--linen); }
.section--dark a { color: var(--on-dark); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row-between { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-end; justify-content: space-between; }
.split { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }

/* Type */
.display { font-family: var(--serif); font-weight: 400; line-height: 0.95; letter-spacing: -0.01em; }
.display--xl { font-size: clamp(44px, 6vw, 80px); }
.display--l { font-size: clamp(36px, 4.5vw, 60px); line-height: 1; }
.display--m { font-size: clamp(30px, 3.4vw, 44px); line-height: 1; }
.display em { color: var(--cocoa); }
.section--dark .display em { color: var(--caramel); }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cocoa); font-weight: 600; }
.lead { font-size: 16px; color: var(--umber); max-width: 540px; }
.muted { color: var(--bark); }
.section--dark .muted { color: var(--on-dark); }

/* Buttons and pills */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn--cocoa { background: var(--cocoa); color: var(--linen); }
.btn--cocoa:hover { background: var(--espresso); color: var(--linen); }
.btn--dark { background: var(--espresso); color: var(--linen); }
.btn--dark:hover { background: var(--cocoa); color: var(--linen); }
.btn--outline { border-color: var(--espresso); color: var(--espresso); }
.btn--caramel { background: var(--caramel); color: var(--espresso); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.btn--light { background: var(--linen); color: var(--espresso); font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--oat); color: var(--espresso); text-decoration: none; font-size: 13px; }
.chip:hover { background: var(--sand); color: var(--espresso); }
.chip.is-active { background: var(--cocoa); color: var(--linen); }
.tag { display: inline-flex; padding: 4px 12px; background: var(--cocoa); color: var(--linen); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.text-link { font-weight: 500; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px; }
.wordmark { font-family: var(--serif); font-size: 28px; line-height: 1; text-decoration: none; color: var(--espresso); }
.primary-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0; }
.social-icons a { width: 36px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.primary-nav .menu-item-new > a { color: var(--cocoa); font-weight: 700; }
.social-icons { display: inline-flex; align-items: center; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; color: var(--cocoa); }
.social-icons a:hover { color: var(--espresso); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.site-footer .social-icons a { color: var(--on-dark); }
.btn--sm { min-height: 38px; padding: 0 18px; font-size: 13px; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; border-radius: 999px; text-decoration: none; color: var(--cocoa); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.primary-nav a:hover { background: var(--oat); color: var(--espresso); }
.primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .is-current > a { background: var(--caramel); color: var(--espresso); }

/* Placeholders (shown until a photo is added) */
.ph { display: flex; align-items: center; justify-content: center; background: var(--sand); color: var(--cocoa); font-size: 14px; border-radius: 12px; overflow: hidden; }
.ph--alt { background: var(--tan); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-11 { aspect-ratio: 1 / 1; }

/* Hero */
.hero { padding-block: 24px 0; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px 56px; align-items: end; }
/* The photo sits on the section's bottom edge, so its cropped bottom reads as the page cutting it off; the cropped right edge fades out. */
.hero__media { display: flex; align-items: flex-end; justify-content: flex-start; align-self: end; line-height: 0; }
.hero__cutout { display: block; width: 100%; max-width: 520px; height: auto; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%); mask-image: linear-gradient(to right, #000 82%, transparent 100%); }
.hero__text { min-width: 0; align-self: center; padding-block: 24px 64px; }
.hero__text .lead { max-width: 520px; }
@media (max-width: 900px) {
	.hero__grid { grid-template-columns: minmax(0, 1fr); }
	.hero__media { justify-content: center; order: 2; }
	.hero__text { padding-block: 8px 0; }
	.hero__cutout { max-width: 420px; }
}
.tiktok-feed { min-height: 360px; }
.wrap { --content: 1200px; }
@media (min-width: 1500px) { :root { --wrap: 1240px; } }
.hero__portrait { flex: 3 1 0; height: 620px; border-radius: 280px 280px 16px 16px; }
.hero__detail { flex: 2 1 0; height: 360px; }
.marquee { background: var(--cocoa); color: var(--linen); overflow: hidden; white-space: nowrap; padding: 12px 0; font-family: var(--serif); font-style: italic; font-size: 24px; }
.marquee span { display: inline-block; padding-right: 0.6em; animation: lw-marquee 40s linear infinite; }
@keyframes lw-marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; } }

/* Grids and cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px 16px; }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card__meta { font-size: 13px; color: var(--bark); }
.card__price { font-size: 13px; font-weight: 500; }
.principle__num { font-family: var(--serif); font-size: 22px; color: var(--cocoa); }
.panel { padding: 28px; background: var(--oat); border-top: 4px solid var(--caramel); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.section--oat .panel { background: var(--linen); }
.panel__big { font-family: var(--serif); font-size: 40px; line-height: 1; }
.panel__mid { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.feature-tile { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 420px; padding: 32px; border-radius: 16px; background: var(--sand) center / cover no-repeat; text-decoration: none; color: var(--espresso); }

/* Category page */
.cat-hero { padding-block: 40px 24px; }
/* Category title: name and intro side by side, close together, split by a fine caramel rule. */
.cat-title { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 32px; }
.cat-title .display { margin: 0; }
.cat-title__rule { width: 1px; align-self: stretch; background: var(--caramel); }
.cat-title .lead { margin: 0 0 6px; max-width: 360px; }
@media (max-width: 600px) { .cat-title__rule { display: none; } }
.cat-section { padding-block: 8px 80px; display: flex; flex-direction: column; gap: 24px; }
.cat-section .chips { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cat-section .chips--sub { padding-bottom: 0; border-bottom: 0; margin-top: -16px; align-items: center; }
.chips--sub .chip { min-height: 34px; background: transparent; border: 1px solid var(--line); font-size: 12.5px; }
.chips--sub .chip.is-active { background: var(--caramel); border-color: var(--caramel); color: var(--espresso); }
.shop-block { padding-block: 36px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.empty-note { padding: 32px; background: var(--oat); color: var(--umber); }

/* Forms */
.field-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field { flex: 1 1 240px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--caramel); background: #FFFFFF; color: var(--espresso); font: inherit; }
.section--dark .field { background: transparent; border-color: var(--bark); color: var(--linen); }
.section--dark .field-label { color: var(--on-dark); }

/* Brand page */
.lock { max-width: 560px; margin: 0 auto; padding: 120px var(--gutter) 160px; display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.lock form { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lock .field-label { color: var(--cocoa); }
.brand-portrait { height: 380px; border-radius: 240px 240px 16px 16px; }
.table-scroll { overflow-x: auto; background: var(--linen); }
.stats-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; }
.stats-table th, .stats-table td { padding: 16px 24px; border-bottom: 1px solid var(--line); text-align: left; }
.stats-table thead th { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cocoa); border-bottom-color: var(--caramel); }
.stats-table tbody th { font-weight: 600; }
.featured-project { display: flex; flex-wrap: wrap; gap: 32px; padding: 32px; background: var(--oat); border-top: 4px solid var(--caramel); }
.featured-project > .ph { flex: 1 1 320px; min-height: 280px; }
.featured-project > div:last-child { flex: 1 1 420px; min-width: 0; justify-content: center; }
.project-row { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.project-row__year { flex: 0 0 72px; font-size: 13px; letter-spacing: 0.18em; color: var(--cocoa); font-weight: 600; }
.project-row__brand { flex: 1 1 240px; font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.project-row__what { flex: 1 1 240px; color: var(--umber); }
.rate { padding: 28px; border: 1px solid var(--umber); display: flex; flex-direction: column; gap: 8px; }
.rate strong { font-size: 16px; }

/* Press, social tiles, teaser */
.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; }
.press-card { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; border-top: 1px solid var(--espresso); text-decoration: none; color: var(--espresso); }
.press-card__outlet { font-family: var(--serif); font-size: 30px; line-height: 1; }
.press-card__title { font-size: 15px; color: var(--umber); }
.tiles { display: grid; gap: 12px; }
.tiles--photo { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tiles--video { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tile { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; background: var(--cocoa); color: var(--linen); }
.tile:nth-child(even) { background: var(--umber); }
.tiles--photo .tile { aspect-ratio: 4 / 5; }
.tiles--video .tile { aspect-ratio: 9 / 16; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__play { position: relative; display: flex; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }
.teaser-image { min-height: 360px; border-radius: 16px; }
.btn--caps { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }

/* Shop: one row per category that scrolls sideways */
.scroller { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
.scroller > .card { flex: 0 0 190px; scroll-snap-align: start; }
.scroller:focus-visible { outline-offset: 6px; }

/* Watch section on category pages */
.watch-card { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 200px; padding: 28px; background: var(--linen); border-top: 4px solid var(--caramel); text-decoration: none; color: var(--espresso); }
.watch-card svg { color: var(--cocoa); }

/* Brand pages */
.brand-nav { display: flex; justify-content: center; gap: 4px; padding: 12px var(--gutter) 40px; }
.brand-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--cocoa); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.brand-nav a[aria-current="page"] { background: var(--caramel); color: var(--espresso); }
.platform-card { padding: 28px; background: var(--linen); border-top: 4px solid var(--caramel); display: flex; flex-direction: column; gap: 20px; }
.platform-card__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gender-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--caramel); }
.gender-bar span { background: var(--cocoa); }
.country-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--cocoa); }

/* Rates calculator */
.rate-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.estimate { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.estimate__form { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; background: var(--linen); }
.estimate__row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.estimate__row:last-child { border-bottom: 0; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--caramel); background: transparent; color: var(--espresso); font: inherit; font-size: 20px; cursor: pointer; }
.stepper button:last-child { border: 0; background: var(--cocoa); color: var(--linen); }
.stepper output { min-width: 36px; text-align: center; font-weight: 600; font-size: 18px; }
.estimate select { min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--caramel); background: #FFFFFF; color: var(--espresso); font: inherit; width: 100%; }
.estimate input[type="range"], .estimate input[type="checkbox"] { accent-color: var(--cocoa); }
.estimate input[type="range"] { width: 100%; }
.estimate__summary { flex: 1 1 340px; min-width: 0; padding: 32px; background: var(--espresso); color: var(--linen); display: flex; flex-direction: column; gap: 16px; }
.estimate__summary .eyebrow { color: var(--caramel); font-size: 12px; }
.estimate__line { display: flex; justify-content: space-between; gap: 16px; }
.estimate__line span:first-child { color: var(--on-dark); }
.estimate__total { border-top: 1px solid var(--umber); padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.estimate__total strong { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1; }

/* Plain pages */
.entry { max-width: 720px; }
.entry > * + * { margin-top: 1em; }
.entry h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; margin-top: 1.4em; }

/* Footer */
.site-footer { background: var(--espresso); color: var(--on-dark); border-top: 1px solid var(--umber); }
.site-footer .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 13px; }
.site-footer a { color: var(--on-dark); }
.site-footer .wordmark { color: var(--linen); font-size: 22px; }

@media (max-width: 720px) {
	:root { --gutter: 16px; }
	.section { padding-block: 72px; }
	.hero__portrait { height: 420px; }
	.hero__detail { height: 240px; }
	.brand-portrait { height: 360px; }
}
[hidden] { display: none !important; }

/* Product photos: their white background blends into the page colour, so only the product shows. */
.card--product .ph { background: transparent; border-radius: 0; }
.card--product .ph img { mix-blend-mode: multiply; object-fit: contain; padding: 8px; }

/* Phones: two products (or cards) per row instead of one long column. */
@media (max-width: 600px) {
	.grid, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.scroller > .card { flex-basis: 150px; }
	.press-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Phones and tablets: the menu, social icons and Subscribe fold into a three-bar button. */
.menu-toggle { display: none; }
@media (max-width: 900px) {
	.site-header .wrap { flex-wrap: wrap; }
	.menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 10px; border: 0; background: transparent; cursor: pointer; }
	.menu-toggle span { display: block; height: 1.5px; background: var(--espresso); border-radius: 2px; transition: transform .2s, opacity .2s; }
	.is-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
	.is-open .menu-toggle span:nth-child(2) { opacity: 0; }
	.is-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
	.primary-nav, .header-actions { display: none; }
	.is-open .primary-nav { display: flex; flex: 1 1 100%; flex-direction: column; align-items: flex-start; padding: 8px 0 4px; border-top: 1px solid var(--line); }
	.is-open .primary-nav ul { flex-direction: column; gap: 0; width: 100%; }
	.is-open .primary-nav a { padding: 0; font-size: 13px; }
	.is-open .header-actions { display: flex; flex: 1 1 100%; flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 8px; }
	.is-open .header-actions .social-icons { margin-left: -10px; }
}


.disclosure-note { font-size: 12px; color: var(--bark); margin: 0; }
.disclosure-note a { color: var(--bark); }

.brand-cta__email { font-size: 18px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.usd { font-family: var(--sans); font-size: 0.32em; letter-spacing: 0.12em; font-weight: 600; vertical-align: middle; opacity: 0.75; }

.currency-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.currency-switch .chip { border: 0; cursor: pointer; font: inherit; font-size: 13px; }
.currency-switch .chip.is-active { background: var(--cocoa); color: var(--linen); }
.currency-disclaimer { margin: 0; font-size: 13px; color: var(--umber); }

#estimate .estimate__form { background: var(--oat); }

/* Product cards (option C): name small and regular in soft brown, price is the boldest line. */
.card--product .card__title { font-size: 13px; font-weight: 400; color: var(--umber); line-height: 1.4; }
.card--product .card__price { font-size: 13px; font-weight: 600; color: var(--espresso); }

/* Rates: text left, cut-out portrait right. */
.hero__grid--text-first { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.hero__grid--text-first .hero__media { justify-content: flex-end; }
.hero__cutout--plain { -webkit-mask-image: none; mask-image: none; max-width: 560px; }
@media (max-width: 900px) { .hero__grid--text-first .hero__media { justify-content: center; } }

/* "more": products whose photo couldn't load, as text rows under the grid */
.more-list { margin-top: 56px; display: flex; flex-direction: column; gap: 16px; }
.more-list__rows { border-top: 1px solid var(--tan); }
.more-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto auto; gap: 8px 24px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--tan); text-decoration: none; color: inherit; }
.more-row:hover .more-row__name { text-decoration: underline; }
.more-row__name { font-size: 13px; color: var(--umber); line-height: 1.4; }
.more-row__price { font-size: 13px; font-weight: 600; color: var(--espresso); }
.more-row__go { font-size: 12px; color: var(--cocoa); }
@media (max-width: 600px) {
	.more-row { grid-template-columns: minmax(0, 1fr) auto; }
	.more-row .eyebrow, .more-row__name { grid-column: 1; }
	.more-row__price { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
	.more-row__go { display: none; }
}
