/* Trion:Z - styles theme.json cannot express. Tokens come from theme.json presets. */

:root {
	--tz-surface: var(--wp--preset--color--surface);
	--tz-stone: var(--wp--preset--color--surface-stone);
	--tz-ink: var(--wp--preset--color--ink);
	--tz-muted: var(--wp--preset--color--ink-muted);
	--tz-line: var(--wp--preset--color--line);
	--tz-line-strong: var(--wp--preset--color--line-strong);
	--tz-sand: var(--wp--preset--color--sand);
	--tz-forest: var(--wp--preset--color--forest);
	--tz-olive: var(--wp--preset--color--olive);
	--tz-header-h: 72px;
	--tz-crumbs-gap: calc(var(--wp--preset--spacing--60) + 15px); /* space under breadcrumbs, every page */
}

/* Collection accents: set data-collection on any wrapper. */
[data-collection="california"] { --accent: var(--wp--preset--color--california); }
[data-collection="japan"]      { --accent: var(--wp--preset--color--japan); }
[data-collection="bali"]       { --accent: var(--wp--preset--color--bali); }
[data-collection="portugal"]   { --accent: var(--wp--preset--color--portugal); }
[data-collection="rio"]        { --accent: var(--wp--preset--color--rio); }

/* Cormorant Garamond's default old-style figures make "10" read like "IO": use lining figures everywhere. */
body { font-variant-numeric: lining-nums; }

.tz-eyebrow {
	font-size: 12px; line-height: 16px; font-weight: 500;
	letter-spacing: .18em; text-transform: uppercase; color: var(--tz-muted);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Skip link */
.tz-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--tz-surface); color: var(--tz-ink); padding: 8px 16px; }
.tz-skip:focus { left: 16px; }

/* Header (Charcoal) */
.tz-header { background: var(--tz-ink); color: var(--tz-surface); position: relative; z-index: 50; }
/* Inner edges line up with the page content: same 1320px column and the same side padding as the body. */
.tz-header__inner {
	--tz-gutter: var(--wp--style--root--padding-left, clamp(16px, 4vw, 48px));
	max-width: none; margin: 0; min-height: var(--tz-header-h); box-sizing: border-box; gap: var(--wp--preset--spacing--60);
	padding: 0 max(var(--tz-gutter), calc((100% - 1320px) / 2));
}
.tz-logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.tz-logo__mark { height: 34px; width: auto; }
.tz-logo__word { height: 18px; width: auto; }
.tz-header a { color: inherit; }
.tz-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--wp--preset--spacing--60); justify-content: center; }
.tz-header__tools { gap: var(--wp--preset--spacing--40); }
.tz-header__tools svg { fill: currentColor; }
.tz-header__tools .wp-block-search__button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 40px; height: 40px; margin: 0; padding: 8px; background: none; color: inherit; border: 0; }
.tz-header__tools .wp-block-search__inside-wrapper { display: flex; align-items: center; }

/* Checkout header */
.tz-header--checkout .tz-header__inner { display: flex; align-items: center; justify-content: space-between; }
.tz-header__secure { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.tz-header__back { font-size: 14px; text-underline-offset: 3px; }

/* Hero */
.tz-hero { background-color: var(--tz-ink); }
.tz-hero h1 { margin-top: 0; }

/* Footer (Charcoal) */
.tz-footer { background: var(--tz-ink); color: var(--tz-surface); padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--70) var(--wp--preset--spacing--60); }
.tz-footer a { color: inherit; text-decoration: none; }
.tz-footer a:hover { color: var(--tz-sand); }
.tz-footer .tz-eyebrow { color: var(--tz-sand); }
.tz-footer .tz-menu { flex-direction: column; gap: 12px; }
.tz-footer .tz-menu a { font-size: 14px; line-height: 20px; }
.tz-footer__tagline { color: var(--wp--preset--color--taupe); font-size: 14px; }
.tz-footer__company { margin-top: 20px; color: var(--wp--preset--color--taupe); font-size: 13px; line-height: 24px; }
.tz-footer__addresses { display: grid; grid-template-columns: repeat(2, max-content); gap: 16px 48px; margin-top: 24px; }
.tz-footer__address-title { margin: 0 0 6px; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tz-sand); }
.tz-footer__addresses address { font-style: normal; color: var(--wp--preset--color--taupe); font-size: 13px; line-height: 24px; }
@media (max-width: 420px) { .tz-footer__addresses { grid-template-columns: 1fr; } }
.tz-footer__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #3e3c37; padding-top: var(--wp--preset--spacing--50); margin-top: var(--wp--preset--spacing--70); font-size: 13px; color: var(--wp--preset--color--taupe); }
.tz-footer__rights { margin: 0; }
.tz-footer__social { display: flex; gap: 4px; list-style: none; margin: 0 -10px 0 0; padding: 0; }
.tz-footer__social a { display: grid; place-items: center; width: 40px; height: 40px; color: var(--tz-surface); transition: color .15s ease; }
.tz-footer__social a:hover { color: var(--tz-sand); }
.tz-footer__social svg { width: 22px; height: 22px; }

/* Focus */
:where(a, button, summary):focus-visible { outline: 2px solid var(--tz-forest); outline-offset: 2px; }
/* Form fields: no outline ring. Focus is shown by a darker, thicker border instead
   (forest green, 7:1 against white, so it still meets WCAG 2.4.7 and 1.4.11). Matches the Stripe card fields. */
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus { outline: none; border-color: var(--tz-forest) !important; box-shadow: 0 0 0 1px var(--tz-forest) !important; }
:where(input[type="checkbox"], input[type="radio"]):focus-visible { outline: 2px solid var(--tz-forest); outline-offset: 2px; }
.select2-container--focus .select2-selection--single, .select2-container--open .select2-selection--single { border-color: var(--tz-forest) !important; box-shadow: 0 0 0 1px var(--tz-forest); outline: none; }
.tz-header :where(a, button):focus-visible, .tz-footer :where(a, button):focus-visible { outline-color: var(--tz-sand); }
/* Buttons and alerts: no focus ring (Jim's call). Keyboard focus on buttons shows the hover colour instead (each :hover rule also lists :focus-visible). Fields, links, menus and checkboxes keep their ring. */
:is(.wp-element-button, .wp-block-button__link, .button, button.button, a.button, input[type="submit"], input[type="button"], .frm_button_submit, [class*="tz-button"], [class*="tz-btn"], .wc-block-components-button, .single_add_to_cart_button):is(:focus, :focus-visible),
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .woocommerce-notices-wrapper, .wc-block-components-notice-banner, .frm_error_style, .frm_message, [role="alert"], [role="status"]):is(:focus, :focus-visible) { outline: none !important; box-shadow: none; }

/* Forms (classic Woo forms until cart/checkout are restyled) */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
	font: inherit; font-size: 15px; min-height: 44px; padding: 0 12px; border: 1px solid var(--tz-line-strong); border-radius: 2px; background: #fff; color: var(--tz-ink); box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, input[type="password"]:hover, input[type="number"]:hover, input[type="search"]:hover, select:hover, textarea:hover { border-color: var(--tz-ink); }
textarea { padding: 10px 12px; }

/* Layout: no gaps between header, main and footer */
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
html.tz-noscroll { overflow: hidden; }

.tz-header__tools .wp-block-woocommerce-mini-cart .wc-block-mini-cart__badge { background: var(--tz-sand); color: var(--tz-ink); }

@media (max-width: 960px) {
	.tz-header__inner { gap: 8px; }
	.tz-logo__mark { height: 30px; }
	.tz-logo__word { height: 15px; }
	.tz-footer { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) {
	.tz-header .tz-logo__word { display: none; }
}

/* ---------- Shared buttons and headings ---------- */
/* Outline button (core "Outline" style) */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--tz-ink); border: 1px solid var(--tz-ink); padding: 15px 27px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover, .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible { background: var(--tz-ink); color: var(--tz-surface); }
/* Light outline for dark sections */
.wp-block-button.tz-btn-light > .wp-block-button__link { color: var(--tz-surface); border-color: rgba(247, 245, 241, .7); }
.wp-block-button.tz-btn-light > .wp-block-button__link:hover, .wp-block-button.tz-btn-light > .wp-block-button__link:focus-visible { background: var(--tz-surface); color: var(--tz-ink); border-color: var(--tz-surface); }
/* Arrow after the label */
/* Drawn arrow (a mask filled with the text colour) so it sits on the centre line of the capitals. */
.wp-block-button.tz-btn-arrow > .wp-block-button__link { display: inline-flex; align-items: center; gap: 10px; }
.wp-block-button.tz-btn-arrow > .wp-block-button__link::after,
.tz-arrow-link a::after,
.tz-collections__cta::after,
.tz-mega__cta::after {
	content: ""; flex: none; width: 14px; height: 10px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5h11.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5h11.5M8.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform .2s ease;
}
.wp-block-button.tz-btn-arrow > .wp-block-button__link:hover::after, .wp-block-button.tz-btn-arrow > .wp-block-button__link:focus-visible::after { transform: translateX(3px); }
.wp-block-button__link { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }

/* Text link with arrow */
.tz-arrow-link { margin: 0; }
.tz-arrow-link a {
	display: inline-flex; align-items: center; gap: 8px; color: var(--tz-ink); text-decoration: none;
	font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
	border-bottom: 1px solid var(--tz-sand); padding-bottom: 3px;
}
.tz-arrow-link a:hover::after { transform: translateX(3px); }

/* Section heading: eyebrow, title, short rule */
.tz-heading { display: flex; flex-direction: column; gap: 16px; margin-top: 0 !important; margin-bottom: var(--wp--preset--spacing--70) !important; }
.tz-heading > * { margin: 0 !important; }
.tz-heading--center { align-items: center; text-align: center; }
.tz-heading__title { font-size: var(--wp--preset--font-size--display-1); line-height: 1.12; }
.tz-heading--split { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; text-align: left; }
.tz-heading--split .tz-arrow-link { padding-bottom: 6px; }
.tz-heading--split > .wp-block-group > * { margin: 0 !important; }
.tz-heading--split .tz-eyebrow { margin-bottom: 16px !important; }
.wp-block-separator.tz-rule { width: 40px; max-width: 40px; height: 1px; margin: 0 !important; border: 0; background: var(--tz-sand); opacity: 1; }

/* Placeholder for photography still to come */
.tz-slot {
	position: relative; display: flex; align-items: center; justify-content: center; margin: 0;
	background: repeating-linear-gradient(135deg, #ddd7cd 0 1px, transparent 1px 14px), var(--tz-stone); color: var(--tz-muted);
}
.tz-slot__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 32ch; padding: 24px; text-align: center; font-size: 12px; line-height: 18px; letter-spacing: .02em; }
/* With a photo: the image fills the slot, cropped to fit. */
.tz-slot.tz-slot--img { display: block; overflow: hidden; background: var(--tz-stone); }
.tz-slot--img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .tz-heading__title { font-size: 34px; } }

/* ---------- Body copy (Journal articles, Help pages) ---------- */
.tz-prose { font-size: 18px; line-height: 1.75; color: var(--tz-ink); }
.tz-prose > * { margin-block: 0 1.2em; }
.tz-prose h2 { font-size: 32px; line-height: 1.2; margin-top: 1.6em; margin-bottom: .6em; }
.tz-prose h3 { font-size: 24px; line-height: 1.25; margin-top: 1.4em; margin-bottom: .5em; }
.tz-prose h4, .tz-prose h5, .tz-prose h6 { font-size: 20px; line-height: 1.3; margin-top: 1.3em; margin-bottom: .4em; }
.tz-prose a { color: var(--tz-forest); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tz-prose a:hover { color: var(--tz-ink); }
.tz-prose strong, .tz-prose b { font-weight: 600; }
.tz-prose ul, .tz-prose ol { padding-left: 1.3em; }
.tz-prose li { margin-bottom: .4em; }
.tz-prose blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--tz-sand); font-family: var(--wp--preset--font-family--display); font-size: 24px; line-height: 1.4; color: var(--tz-ink); }
.tz-prose img { max-width: 100%; height: auto; }
.tz-prose figure, .tz-prose .wp-caption { max-width: 100% !important; margin-inline: 0; }
.tz-prose figcaption, .tz-prose .wp-caption-text { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--tz-muted); }
.tz-prose .aligncenter { display: block; margin-inline: auto; }
.tz-prose .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.tz-prose .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.tz-prose::after { content: ""; display: table; clear: both; }
.tz-prose iframe, .tz-prose video, .tz-prose embed { display: block; max-width: 100%; }
.tz-prose iframe[src*="youtube"], .tz-prose iframe[src*="vimeo"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
.tz-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tz-prose th, .tz-prose td { padding: 10px 12px; border-bottom: 1px solid var(--tz-line); text-align: left; }
.tz-prose hr { border: 0; height: 1px; background: var(--tz-line); margin: 2em 0; }
/* Old posts carry inline font and colour styling: let the theme's type win. */
.tz-prose [style*="font-family"] { font-family: inherit !important; }
.tz-prose span[style*="font-size"], .tz-prose p[style*="font-size"] { font-size: inherit !important; }
.tz-prose [style*="color"]:not(a) { color: inherit !important; }

/* Accordions: content fades in as the panel opens (height is animated by assets/js/accordion.js). */
details.tz-acc[open] > :not(summary), .tz-prose details[open] > :not(summary) { animation: tz-acc-in .26s ease both; }
details.is-closing > :not(summary) { opacity: 0; transition: opacity .18s ease; }
@keyframes tz-acc-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	details.tz-acc[open] > :not(summary), .tz-prose details[open] > :not(summary) { animation: none; }
}

/* Jump links (#anchors) glide rather than jump, site-wide. Off for people who ask for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
:target { scroll-margin-top: 16px; }
