/* =============================================================
   Herdade das Estevas — main.css
   Design system extracted from the approved mockups.
   ============================================================= */

:root {
	/* Palette */
	--hde-cream:        #f4eedf; /* page background (parchment) */
	--hde-cream-2:      #fbf7ec; /* raised panels */
	--hde-cream-3:      #efe7d3; /* subtle bands */
	--hde-blue:         #29396a; /* azulejo blue — primary */
	--hde-blue-ink:     #223058; /* darker text blue */
	--hde-blue-soft:    #5a6890; /* muted blue */
	--hde-olive:        #6e7043; /* button green */
	--hde-olive-dark:   #585a34;
	--hde-line:         #cabf9f; /* warm hairline */
	--hde-line-soft:    #e2d8bf;
	--hde-body:         #3b3a33; /* body ink */

	/* Type */
	--hde-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
	--hde-body-font: "EB Garamond", Georgia, "Times New Roman", serif;

	/* Metrics */
	--hde-max: 1240px;
	--hde-gutter: clamp(1.1rem, 4vw, 3rem);
	--hde-radius: 2px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--hde-cream);
	color: var(--hde-body);
	font-family: var(--hde-body-font);
	font-size: 1.075rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hde-blue); text-decoration: none; }
a:hover { color: var(--hde-blue-ink); }
h1, h2, h3, h4 {
	font-family: var(--hde-display);
	color: var(--hde-blue);
	font-weight: 600;
	line-height: 1.08;
	margin: 0 0 .6em;
}
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--hde-olive); outline-offset: 3px; }

.hde-container { width: 100%; max-width: var(--hde-max); margin-inline: auto; padding-inline: var(--hde-gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 100; background: var(--hde-blue);
	color: #fff; padding: .6rem 1rem; border-radius: var(--hde-radius);
}
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }

/* ---------- Eyebrow labels & dividers ---------- */
.hde-eyebrow {
	font-family: var(--hde-display);
	text-transform: uppercase;
	letter-spacing: .22em;
	font-weight: 600;
	color: var(--hde-blue);
	font-size: 1.5rem;
}
.hde-link {
	display: inline-flex; align-items: center; gap: .5rem;
	text-transform: uppercase; letter-spacing: .16em; font-size: .82rem;
	font-family: var(--hde-display); font-weight: 600; color: var(--hde-blue);
}
.hde-link .hde-icon { width: .8rem; height: .8rem; transition: transform .25s ease; }
.hde-link:hover .hde-icon { transform: translateX(3px); }
.hde-icon { display: inline-block; vertical-align: middle; }

/* Olive-branch divider */
.hde-branch { color: var(--hde-blue); width: 210px; max-width: 60%; height: auto; margin: .4rem 0; }
.hde-rosette { color: var(--hde-blue); }

/* ---------- Buttons ---------- */
.hde-btn {
	display: inline-block; font-family: var(--hde-display); font-weight: 600;
	text-transform: uppercase; letter-spacing: .16em; font-size: .9rem;
	padding: .95rem 2.1rem; border: 0; cursor: pointer; border-radius: var(--hde-radius);
	background: var(--hde-olive); color: #f6f2e6; transition: background .25s ease, transform .2s ease;
}
.hde-btn:hover { background: var(--hde-olive-dark); color: #fff; transform: translateY(-1px); }
.hde-btn--ghost {
	background: transparent; color: var(--hde-blue);
	border: 1px solid var(--hde-blue); 
}
.hde-btn--ghost:hover { background: var(--hde-blue); color: var(--hde-cream); }

/* ============================================================
   Ornamental page frame (azulejo corners)
   ============================================================ */
.hde-frame { position: relative; }
.hde-corner {
	position: absolute; width: clamp(48px, 7vw, 92px); height: auto;
	color: var(--hde-blue); opacity: .85; pointer-events: none; z-index: 3;
}
.hde-corner--tl { top: 14px; left: 14px; }
.hde-corner--tr { top: 14px; right: 14px; transform: scaleX(-1); }
.hde-corner--bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.hde-corner--br { bottom: 14px; right: 14px; transform: scale(-1,-1); }
@media (max-width: 640px) { .hde-corner { display: none; } }

/* ============================================================
   Header
   ============================================================ */
.site-header {
	position: relative; z-index: 20;
	background: var(--hde-cream);
	border-bottom: 1px solid var(--hde-line-soft);
}
.site-header__inner {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center;
	gap: 1.5rem; padding-block: 1rem;
}
.site-brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.site-brand__emblem { width: 58px; height: auto; color: var(--hde-blue); flex: none; }
.site-brand__logo img { max-height: 62px; width: auto; }
.site-brand__text { line-height: .95; }
.site-brand__name {
	font-family: var(--hde-display); color: var(--hde-blue); font-weight: 600;
	font-size: 1.5rem; letter-spacing: .06em; text-transform: uppercase;
}
.site-brand__name small { display: block; font-size: .62em; letter-spacing: .34em; }

.primary-nav { justify-self: center; }
.primary-nav ul { list-style: none; display: flex; gap: clamp(1rem, 2.4vw, 2.4rem); margin: 0; padding: 0; }
.primary-nav a {
	font-family: var(--hde-display); text-transform: uppercase; letter-spacing: .14em;
	font-size: .86rem; font-weight: 600; color: var(--hde-blue); padding-block: .4rem; position: relative;
}
.primary-nav a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
	background: var(--hde-olive); transform: scaleX(0); transition: transform .25s ease;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 1rem; justify-self: end; }
.header-actions a { color: var(--hde-blue); display: inline-flex; }
.header-actions .hde-icon { width: 22px; height: 22px; }
.nav-toggle {
	display: none; background: none; border: 0; color: var(--hde-blue); cursor: pointer; padding: .3rem;
}
.nav-toggle .hde-icon { width: 28px; height: 28px; }

/* Mobile nav */
@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; order: -1; justify-self: start; }
	.site-header__inner { grid-template-columns: auto 1fr auto; }
	.primary-nav {
		position: absolute; inset: 100% 0 auto 0; background: var(--hde-cream-2);
		border-bottom: 1px solid var(--hde-line); box-shadow: 0 12px 30px rgba(34,48,88,.12);
		max-height: 0; overflow: hidden; transition: max-height .3s ease; justify-self: stretch;
	}
	.primary-nav.is-open { max-height: 70vh; }
	.primary-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--hde-gutter); }
	.primary-nav li { border-bottom: 1px solid var(--hde-line-soft); }
	.primary-nav a { display: block; padding: .9rem 0; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; border-bottom: 1px solid var(--hde-line-soft); }
.hero__grid { display: grid; grid-template-columns: 0.92fr 1.08fr; align-items: stretch; }
.hero__intro {
	display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
	padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
}
.hero__rosette { width: 46px; height: 46px; color: var(--hde-blue); margin-bottom: 1rem; }
.hero__title {
	font-family: var(--hde-display); color: var(--hde-blue); font-weight: 600;
	text-transform: uppercase; line-height: .92; margin: 0;
	font-size: clamp(2.8rem, 6vw, 5rem); letter-spacing: .02em;
}
.hero__title .das { display: block; font-size: .42em; letter-spacing: .5em; margin: .25em 0 .1em 0; }
.hero__sub {
	font-family: var(--hde-display); text-transform: uppercase; letter-spacing: .28em;
	color: var(--hde-blue); font-size: 1.05rem; font-weight: 600; margin: .6rem 0 .2rem;
}
.hero__lede { max-width: 30ch; color: var(--hde-blue-ink); font-size: 1.12rem; margin: 1rem 0 1.6rem; }
.hero__media { position: relative; min-height: 420px; background: var(--hde-cream-3); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__media { min-height: 300px; order: -1; }
	.hero__intro { align-items: center; text-align: center; }
	.hero__lede { max-width: 42ch; }
}

/* ============================================================
   Section scaffolding
   ============================================================ */
.section { padding-block: clamp(2.6rem, 6vw, 4.6rem); border-bottom: 1px solid var(--hde-line-soft); }
.section--tint { background: var(--hde-cream-2); }
.section__head { text-align: center; margin-bottom: 2rem; }
.split { display: grid; gap: clamp(1.6rem, 5vw, 3.4rem); align-items: center; }
.split--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .split--2 { grid-template-columns: 1fr; } }

/* História */
.historia__art {
	border: 3px double var(--hde-blue); padding: .9rem; background: var(--hde-cream-2);
}
.historia__art .hde-emblem { color: var(--hde-blue); width: 100%; height: auto; }
.historia__body .hde-eyebrow { font-size: 1.9rem; }
.feature-grid {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
	margin-top: 2.4rem; border-top: 1px solid var(--hde-line); padding-top: 2rem;
}
.feature { text-align: center; }
.feature__icon { width: 44px; height: 44px; color: var(--hde-blue); margin: 0 auto .8rem; }
.feature__label {
	font-family: var(--hde-display); text-transform: uppercase; letter-spacing: .13em;
	font-size: .82rem; color: var(--hde-blue); font-weight: 600; line-height: 1.35;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; } }

/* Azeite (photo + notes) */
.azeite__media { position: relative; min-height: 320px; background: var(--hde-cream-3); }
.azeite__media img { width: 100%; height: 100%; object-fit: cover; }
.azeite__notes { position: relative; }
.azeite__rosette { position: absolute; top: .2rem; right: 0; width: 54px; color: var(--hde-blue); opacity: .8; }
.azeite__notes .hde-eyebrow { font-size: 1.9rem; }

/* Excelência + Formatos */
.excel { text-align: center; }
.excel__lede { max-width: 42ch; margin: 0 auto 2rem; color: var(--hde-blue-ink); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.badge { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.badge__ring {
	width: 76px; height: 76px; border: 1px solid var(--hde-line); border-radius: 50%;
	display: grid; place-items: center; color: var(--hde-blue);
}
.badge__ring .hde-icon { width: 40px; height: 40px; }
.badge__label {
	font-family: var(--hde-display); text-transform: uppercase; letter-spacing: .12em;
	font-size: .78rem; color: var(--hde-blue); font-weight: 600; line-height: 1.35;
}

.formatos__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: end; }
.formato { text-align: center; }
.formato__img { display: flex; align-items: flex-end; justify-content: center; min-height: 150px; }
.formato__img img { max-height: 150px; width: auto; }
.formato__cap {
	margin-top: .7rem; font-family: var(--hde-display); text-transform: uppercase;
	letter-spacing: .14em; font-size: .85rem; color: var(--hde-blue); font-weight: 600;
}
.formato__placeholder {
	width: 44px; height: 120px; margin: 0 auto; border: 1px solid var(--hde-line);
	border-radius: 8px 8px 4px 4px; background: linear-gradient(var(--hde-cream-2), var(--hde-cream-3));
	position: relative;
}
.formato__placeholder::before {
	content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
	width: 14px; height: 12px; background: var(--hde-blue); border-radius: 2px;
}
@media (max-width: 560px) { .badges, .formatos__list { grid-template-columns: repeat(2, 1fr); row-gap: 1.8rem; } }

/* ============================================================
   Newsletter band
   ============================================================ */
.newsletter-band { background: var(--hde-blue); color: var(--hde-cream); text-align: center; padding-block: clamp(2.4rem,5vw,3.6rem); }
.newsletter-band h2 { color: var(--hde-cream); }
.newsletter-band .hde-eyebrow { color: var(--hde-cream); }
.newsletter-band p { color: #e7ddc7; max-width: 46ch; margin-inline: auto; }
.newsletter-band .hde-branch { color: var(--hde-cream); opacity: .8; }

/* ============================================================
   Generic page/post content
   ============================================================ */
.page-hero { text-align: center; padding-block: clamp(2.4rem, 6vw, 4rem); border-bottom: 1px solid var(--hde-line-soft); }
.page-hero .hde-eyebrow { font-size: clamp(2rem, 5vw, 3rem); }
.entry-content { max-width: 72ch; margin-inline: auto; }
.entry-content h2 { margin-top: 1.8rem; }
.entry-content img { border: 1px solid var(--hde-line); }
.entry-content blockquote {
	border-left: 3px solid var(--hde-olive); margin: 1.5rem 0; padding: .3rem 0 .3rem 1.3rem;
	font-style: italic; color: var(--hde-blue-ink);
}
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--hde-cream-2); border-top: 1px solid var(--hde-line); position: relative; }
.site-footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding-block: clamp(2.4rem,5vw,3.4rem); }
.site-footer__brand .site-brand__emblem { width: 66px; }
.footer-col h4 {
	font-size: 1.2rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: var(--hde-blue-ink); }
.footer-col a:hover { color: var(--hde-olive); }
.site-footer__bottom {
	border-top: 1px solid var(--hde-line-soft); padding-block: 1.2rem; text-align: center;
	font-size: .85rem; color: var(--hde-blue-soft); display: flex; gap: 1rem; justify-content: center;
	flex-wrap: wrap; align-items: center;
}
@media (max-width: 720px) { .site-footer__top { grid-template-columns: 1fr; text-align: center; } .site-footer__brand .site-brand { justify-content: center; } }

/* ============================================================
   Language switcher
   ============================================================ */
.hde-lang { display: inline-flex; gap: .4rem; align-items: center; font-family: var(--hde-display); }
.hde-lang a, .hde-lang span {
	font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hde-blue-soft);
}
.hde-lang a:hover { color: var(--hde-blue); }
.hde-lang .is-current { color: var(--hde-blue); font-weight: 600; }
.hde-lang .sep { opacity: .5; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
