/*
Theme Name: Rengon kanelitontut
Description: Joulugranolan WooCommerce-teema.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: rengon-kanelitontut
*/

:root {
	--green: #142c24;
	--deep: #10251e;
	--cream: #fcf6e8;
	--paper: #fffbf2;
	--gold: #f0c77d;
	--wine: #6b292b;
	--ink: #22362e;
	--muted: #52635a;
	--line: #ded3be;
	--serif: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 1rem/1.6 system-ui, sans-serif; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ca784b; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.07; }
p { margin: 0 0 1rem; }
.shell { width: min(100% - 3rem, 74rem); margin-inline: auto; }

.site-header, .site-footer { color: var(--cream); background: var(--deep); }
.site-header { border-bottom: 1px solid #ffffff24; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.header-inner { min-height: 5.2rem; }
.brand { display: inline-flex; gap: .7rem; align-items: center; color: var(--cream); text-decoration: none; font: 1.08rem/1.03 var(--serif); flex-shrink: 0; }
.brand strong { font-weight: 400; font-size: 1.22em; }
.brand-mark { color: var(--gold); font: 2rem/1 var(--serif); }
.site-nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; column-gap: clamp(.85rem, 3vw, 2rem); row-gap: .35rem; }
.site-nav a, .site-footer nav a { text-decoration: none; font-size: .9rem; font-weight: 650; }
.site-nav a:hover, .site-footer nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.cart-link { color: var(--gold); }
.footer-inner { min-height: 8rem; padding-block: 1.8rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; color: #e8dfcb; font-size: .95rem; }

.hero { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); background: var(--green); color: var(--cream); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(4rem, 7vw, 7rem) clamp(1.5rem, 4vw, 4rem) clamp(4rem, 7vw, 7rem) max(1.5rem, calc((100vw - 74rem) / 2)); }
.overline { margin-bottom: .95rem; font-size: .875rem; line-height: 1.4; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.overline span { margin-right: .25em; font-size: 1.15em; }
.hero .overline, .gift .overline { color: var(--gold); }
.hero h1 { font-size: clamp(3rem, 5.35vw, 6.15rem); letter-spacing: -.07em; }
.hero h1 em { color: var(--gold); font-weight: 400; }
.hero-description { max-width: 32ch; margin: 1.4rem 0 1.75rem; color: #f0e7d4; font-size: clamp(1.08rem, 1.5vw, 1.27rem); }
.hero-photo { position: relative; margin: 0; min-height: 30rem; background: #394135; }
.hero-photo img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 55% 52%; }
.hero-photo figcaption, .image-note { position: absolute; right: .6rem; bottom: .6rem; border-radius: .2rem; padding: .18rem .48rem; background: #10251eea; color: var(--cream); font-size: .78rem; }

.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.wc-block-components-button.wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	gap: .4rem; min-height: 3rem; padding: .68rem 1.2rem; border: 1px solid transparent;
	border-radius: .2rem; font: 700 .95rem/1.4 system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.button-gold { background: var(--gold); color: var(--deep); }
.button-gold:hover { background: #f6d79e; }
.button-green, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt,
.wc-block-components-button:not(.is-link).wp-element-button { background: var(--green); color: var(--cream); }
.button-green:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.wc-block-components-button:not(.is-link).wp-element-button:hover { background: #2b4a3e; color: var(--cream); }
.button-outline { background: transparent; color: var(--cream); border-color: var(--gold); }
.button-outline:hover { background: #ffffff10; }

.selection { padding-block: clamp(3.75rem, 7vw, 6rem); scroll-margin-top: 1.25rem; }
.section-intro { margin: 0 auto clamp(1.8rem, 4vw, 3rem); max-width: 48rem; text-align: center; }
.section-intro .overline, .product-card .overline { color: var(--wine); }
.section-intro h2, .gift h2 { font-size: clamp(2.35rem, 4.65vw, 4.2rem); letter-spacing: -.055em; }
.section-intro > p:last-child { margin: .85rem 0 0; color: var(--muted); font-size: 1.05rem; }
.products-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.1rem, 3vw, 2rem); max-width: 58rem; margin-inline: auto; }
.product-card { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: .35rem; }
.product-art { position: relative; aspect-ratio: 1.62; overflow: hidden; background: #ded4bf; }
.product-art img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 53%; }
.product-copy { padding: clamp(1.25rem, 3.2vw, 2.2rem); flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.product-copy .overline { margin-bottom: .56rem; }
.product-copy h3 { font-size: clamp(1.8rem, 3vw, 2.52rem); letter-spacing: -.04em; }
.product-copy > p:not(.overline) { margin: .7rem 0 0; color: var(--muted); }
.purchase { width: 100%; align-self: stretch; margin-top: auto; padding-top: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.purchase .price { font-weight: 750; font-size: 1.16rem; }
.store-status { width: fit-content; margin: 1.85rem auto 0; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: .2rem; text-align: center; color: var(--green); font-weight: 650; }

.gift { background: var(--wine); color: var(--cream); text-align: center; }
.gift-inner { position: relative; display: grid; place-items: center; padding-block: clamp(3rem, 6vw, 5.8rem); }
.gift-inner > div { max-width: 38rem; }
.gift-mark { color: var(--gold); font-size: 2.6rem; line-height: 1; margin-bottom: 1.15rem; }
.gift h2 + p { max-width: 35ch; margin: 1.2rem auto 1.45rem; color: #fff2df; }

.content { width: min(100% - 3rem, 68rem); min-height: 45vh; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.content h1 { font-size: clamp(2.65rem, 5vw, 4.6rem); letter-spacing: -.05em; margin-bottom: 1.35rem; }
.content h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); margin: 1.4em 0 .45em; }
.content p, .content ul:not(.products) { max-width: 70ch; }
.woocommerce div.product .product_title { margin-bottom: .65rem; }
.woocommerce div.product p.price, .woocommerce ul.products li.product .price { color: var(--wine); font-size: 1.15rem; font-weight: 650; }
.woocommerce .woocommerce-breadcrumb { color: var(--muted); }
.woocommerce ul.products li.product h2 { font-size: 1.55rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { top: .75rem; left: .75rem; z-index: 9999; clip: auto; height: auto; width: auto; padding: .55rem .85rem; background: var(--paper); color: var(--ink); }

@media (max-width: 850px) {
	.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.hero-photo { min-height: 26rem; }
	.hero h1 { font-size: clamp(2.65rem, 6vw, 4rem); }
}
@media (max-width: 640px) {
	.shell, .content { width: calc(100% - 2rem); }
	.header-inner { min-height: 4.65rem; gap: .75rem; }
	.site-nav a { font-size: .85rem; }
	.brand { gap: .42rem; font-size: 1rem; }
	.brand-mark { font-size: 1.55rem; }
	.hero { grid-template-columns: 1fr; }
	.hero-copy { padding: 3rem 1.3rem 3.15rem; }
	.hero h1 { font-size: clamp(2.95rem, 10.1vw, 4.85rem); }
	.hero-photo { min-height: 0; aspect-ratio: 1.36; }
	.products-grid { grid-template-columns: 1fr; }
	.footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
