/*
Theme Name:  Brandezain
Theme URI:   https://brandezain.com
Author:      Brandezain
Author URI:  https://brandezain.com
Description: Brand localization agency theme for Brandezain — six-page marketing site (Home, About, Philosophy, Method, Services, Blog), built for Elementor page editing. Warm cream canvas with mustard / lavender / pink / teal / peach accent blocks, Space Grotesk display type, Hanken Grotesk body type.
Version:     1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brandezain

Design tokens (color, type, spacing, radius) are declared below AND mirrored
into theme.json under settings.custom / settings.color.palette /
settings.spacing.spacingSizes, so WordPress also prints them as
--wp--custom--* / --wp--preset--* custom properties in its global
stylesheet. The :root block below is the authoritative set this
stylesheet's own rules use; theme.json exposes the same values to the
block editor, Elementor's global panel, and any other tool that reads it.

Spacing has been remapped from the original 4px base scale onto Google's
8dp grid (every value is now a multiple of 8px). Only two tokens actually
changed: --space-1 (4px -> 8px) and --space-3 (12px -> 16px); the rest of
the original scale (16/24/32/48/64/96) already sat on 8px multiples.
*/

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  /* ---- COLOR ---------------------------------------------------- */
  --color-bg:            #FBF7EE;   /* warm cream canvas            */
  --color-surface:       #FFFFFF;   /* white cards                  */
  --color-surface-soft:  #F2EBDA;   /* soft cream panels            */
  --color-ink:           #17130F;   /* near-black text              */
  --color-ink-soft:      #5E564B;   /* muted body text              */
  --color-line:          #E5DCC8;   /* hairline borders             */
  --color-on-dark:       #FBF7EE;   /* text/marks on dark surfaces  */

  /* brand accents (cycled, never twice in a row) */
  --color-yellow:        #F4CE3E;
  --color-lavender:      #C9B7F1;
  --color-pink:          #FF5C97;
  --color-teal:          #16332F;
  --color-peach:         #FFB07C;
  --color-ochre:         #E7B24A;

  /* ---- TYPE -------------------------------------------------------- */
  --font-display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --fs-display:  clamp(2.9rem, 6.4vw, 5.4rem);
  --fs-h1:       clamp(2.3rem, 4.6vw, 3.6rem);
  --fs-h2:       clamp(1.8rem, 3.2vw, 2.7rem);
  --fs-h3:       clamp(1.3rem, 1.7vw, 1.6rem);
  --fs-lead:     clamp(1.1rem, 1.5vw, 1.3rem);
  --fs-body:     1.0625rem;
  --fs-small:    0.875rem;

  /* ---- SPACING (8dp grid) ------------------------------------------ */
  --space-1: 8px;   --space-2: 8px;   --space-3: 16px;  --space-4: 16px;
  --space-5: 24px;  --space-6: 32px;  --space-7: 48px;  --space-8: 64px;
  --space-9: 96px;
  --space-section: clamp(64px, 9vw, 120px);

  /* ---- RADIUS -------------------------------------------------------- */
  --radius-sm:   10px;
  --radius-md:   18px;
  --radius-lg:   28px;
  --radius-xl:   40px;
  --radius-pill: 999px;

  /* ---- LAYOUT ---------------------------------------------------- */
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* =====================================================================
   RESET
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-ink); text-decoration: none; }
a:hover { color: var(--color-pink); }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* WordPress core / accessibility utilities */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--color-surface); border-radius: var(--radius-sm);
  clip: auto !important; clip-path: none; color: var(--color-ink);
  display: block; height: auto; left: 5px; line-height: normal;
  padding: 15px 23px; text-decoration: none; top: 5px; width: auto; z-index: 100000;
}
.alignleft  { float: left; margin-right: var(--space-5); }
.alignright { float: right; margin-left: var(--space-5); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide  { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; }
.alignfull  { width: 100%; max-width: none; }

/* =====================================================================
   TYPE HELPERS
   ===================================================================== */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); text-wrap: balance; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--color-ink-soft); }
.muted { color: var(--color-ink-soft); }
p { text-wrap: pretty; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  padding: 7px 14px; border-radius: var(--radius-pill);
}
.eyebrow::before { content: "\2726"; color: var(--color-pink); font-size: 0.85em; }
.eyebrow--plain::before { display: none; }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section--soft { background: var(--color-surface-soft); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.stack > * + * { margin-top: var(--space-4); }
.section-head { max-width: 760px; margin-bottom: var(--space-8); }
.section-head .lead { margin-top: var(--space-4); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 14px 24px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; transition: background .14s ease, color .14s ease, border-color .14s ease;
  white-space: nowrap;
}
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--color-ink); color: var(--color-on-dark); }
.btn--primary:hover { background: var(--color-pink); color: #fff; }
.btn--ghost { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--ghost:hover { background: var(--color-ink); color: var(--color-on-dark); }
.btn--on-dark { background: var(--color-yellow); color: var(--color-ink); }
.btn--on-dark:hover { background: #fff; color: var(--color-ink); }
.btn--sm { padding: 10px 18px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* =====================================================================
   NAV
   ===================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}
.nav__inner { display: flex; align-items: center; gap: var(--space-6); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--color-ink); }
.brand__mark { width: 30px; height: 26px; color: var(--color-ink); }
.brand__mark svg { width: 100%; height: 100%; }
.nav__links { display: flex; gap: var(--space-5); margin-left: auto; flex-wrap: wrap; }
.nav__links a { font-weight: 500; font-size: 0.98rem; color: var(--color-ink-soft); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--color-ink); }
.nav__links a[aria-current="page"] { font-weight: 600; }
.nav__cta { margin-left: var(--space-2); }
.nav__links ul { display: contents; }
.nav__links li { display: contents; }

@media (max-width: 980px) {
  .nav__inner { flex-wrap: wrap; min-height: 0; padding-block: 14px; gap: var(--space-3) var(--space-5); }
  .nav__links { margin-left: 0; order: 3; width: 100%; gap: var(--space-4); }
  .nav__cta { margin-left: auto; }
}

/* =====================================================================
   MOSAIC (hero geometric grid)
   ===================================================================== */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius-md);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; min-height: 0; height: 100%;
}
.tile--yellow   { background: var(--color-yellow); }
.tile--lavender { background: var(--color-lavender); }
.tile--pink     { background: var(--color-pink); }
.tile--teal     { background: var(--color-teal);   color: var(--color-on-dark); }
.tile--peach    { background: var(--color-peach); }
.tile--ink      { background: var(--color-ink);    color: var(--color-on-dark); }
.tile--wide  { grid-column: span 2; aspect-ratio: 2 / 1; }
.tile--tall  { grid-row: span 2; aspect-ratio: 1 / 2; }
/* petal cutouts - big radius on one corner */
.petal-tl { border-top-left-radius: 92%; }
.petal-tr { border-top-right-radius: 92%; }
.petal-br { border-bottom-right-radius: 92%; }
.petal-bl { border-bottom-left-radius: 92%; }
.tile__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -0.03em; }
.tile__label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; opacity: .8; margin-top: 4px; }
.tile__tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

/* image placeholder (default page content ships with these; drop in real
   images / featured images and remove the .ph class when ready) */
.ph { position: relative; background: var(--color-surface-soft); }
.ph::after {
  content: attr(data-ph);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-ink-soft); opacity: .55; text-align: center; padding: 12px;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph--peach { background: var(--color-peach); }
.ph--lav   { background: var(--color-lavender); }
.ph--tint  { background: color-mix(in srgb, var(--color-teal) 12%, var(--color-surface-soft)); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: var(--space-section); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy .eyebrow { margin-bottom: var(--space-5); }
.hero__copy .display { margin-bottom: var(--space-5); }
.hero__copy .lead { max-width: 46ch; margin-bottom: var(--space-6); }
.hero__ctas { margin-top: var(--space-6); }
.hero__note { margin-top: var(--space-4); font-size: var(--fs-small); color: var(--color-ink-soft); }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.scribble { width: min(340px, 60%); height: auto; color: var(--color-ink); opacity: .9; margin-bottom: var(--space-6); }

/* =====================================================================
   CARDS
   ===================================================================== */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.feature {
  border-radius: var(--radius-lg); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  min-height: 240px;
}
.feature h3 { font-size: 1.4rem; }
.feature .feature__k { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; letter-spacing: -0.03em; }
.feature--yellow   { background: var(--color-yellow); }
.feature--lavender { background: var(--color-lavender); }
.feature--pink     { background: var(--color-pink);  color: #fff; }
.feature--teal     { background: var(--color-teal);  color: var(--color-on-dark); }
.feature--peach    { background: var(--color-peach); }
.feature--cream    { background: var(--color-surface-soft); }
.feature--pink .muted, .feature--teal .muted { color: color-mix(in srgb, currentColor 78%, transparent); }
.feature__spacer { margin-top: auto; }

/* photo-backed feature card - image fills the block, text overlays */
.feature--photo { position: relative; overflow: hidden; color: #fff; }
.feature--photo .feature__img { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.feature--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  background: linear-gradient(175deg, rgba(23,19,15,.28) 0%, rgba(23,19,15,.55) 45%, rgba(23,19,15,.88) 100%);
}
.feature--photo > *:not(.feature__img) { position: relative; z-index: 2; }
.feature--photo .muted { color: rgba(255,255,255,.82); }
.feature--photo .feature__img.ph::after { color: rgba(255,255,255,.85); opacity: .9; }

.card {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card__index { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--color-pink); letter-spacing: 0.05em; }

/* =====================================================================
   PROCESS / STEPS
   ===================================================================== */
.steps { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-line); }
.step__no { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: 1; letter-spacing: -0.04em; color: var(--color-ink); opacity: .12; }
.step h3 { margin-top: var(--space-3); }
.step p { margin-top: var(--space-2); color: var(--color-ink-soft); }
.step--accent-1 { background: var(--color-lavender); border-color: transparent; }
.step--accent-2 { background: var(--color-peach); border-color: transparent; }
.step--accent-3 { background: var(--color-yellow); border-color: transparent; }
.step--accent-1 .step__no, .step--accent-2 .step__no, .step--accent-3 .step__no { opacity: .28; }

/* =====================================================================
   SPLIT (text + block)
   ===================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--wide-l { grid-template-columns: 1.15fr 0.85fr; }
.split--wide-r { grid-template-columns: 0.85fr 1.15fr; }
@media (max-width: 860px) { .split, .split--wide-l, .split--wide-r { grid-template-columns: 1fr; } }
.split__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }

/* big list with rules */
.risk-list { border-top: 1px solid var(--color-line); }
.risk-list li { border-bottom: 1px solid var(--color-line); padding: var(--space-5) 0; display: grid; grid-template-columns: 44px 1fr; gap: var(--space-4); align-items: start; }
.risk-list .k { font-family: var(--font-display); font-weight: 700; color: var(--color-pink); font-size: 1.1rem; }
.risk-list h3 { font-size: 1.25rem; margin-bottom: 4px; }
.risk-list p { color: var(--color-ink-soft); }

/* =====================================================================
   PRICING
   ===================================================================== */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); align-items: stretch; }
@media (max-width: 860px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.tier--featured { background: var(--color-teal); color: var(--color-on-dark); border-color: transparent; }
.tier__name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.tier__price { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; }
.tier__price span { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--color-ink-soft); letter-spacing: 0; }
.tier--featured .tier__price span { color: color-mix(in srgb, var(--color-on-dark) 70%, transparent); }
.tier__feats { display: flex; flex-direction: column; gap: 10px; margin-top: var(--space-2); }
.tier__feats li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 0.98rem; }
.tier__feats li::before { content: "\2713"; color: var(--color-pink); font-weight: 700; }
.tier--featured .tier__feats li::before { color: var(--color-yellow); }
.tier__tag { align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--color-yellow); color: var(--color-ink); padding: 5px 12px; border-radius: var(--radius-pill); }
.tier .btn { margin-top: auto; }

/* =====================================================================
   BLOG
   ===================================================================== */
.post { display: flex; flex-direction: column; gap: var(--space-3); }
.post__media { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 3/2; }
.post__cat { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-pink); }
.post h3 { font-size: 1.3rem; }
.post__meta { font-size: var(--fs-small); color: var(--color-ink-soft); }
.post--feature { grid-column: span 2; }
.post--feature .post__media { aspect-ratio: 21/9; }
@media (max-width: 620px) { .post--feature { grid-column: 1; } }

/* =====================================================================
   CTA BAND
   ===================================================================== */
.cta-band { background: var(--color-ink); color: var(--color-on-dark); border-radius: var(--radius-xl); padding: clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.cta-band .display { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin-bottom: var(--space-5); max-width: 18ch; }
.cta-band .lead { color: color-mix(in srgb, var(--color-on-dark) 78%, transparent); max-width: 48ch; margin-bottom: var(--space-6); }
.cta-band .petal-deco { position: absolute; width: 220px; height: 220px; border-radius: 50%; }
.cta-band .petal-deco.a { background: var(--color-pink); top: -70px; right: -40px; opacity: .9; }
.cta-band .petal-deco.b { background: var(--color-yellow); bottom: -90px; right: 130px; border-radius: 92% 0 0 0; opacity: .9; }

/* =====================================================================
   FOOTER (cream, with horizon)
   ===================================================================== */
.foot { background: var(--color-surface-soft); padding-top: var(--space-section); position: relative; overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); padding-bottom: var(--space-8); }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-ink-soft); margin-bottom: var(--space-4); }
.foot ul { display: flex; flex-direction: column; gap: 10px; }
.foot ul a { color: var(--color-ink); font-weight: 500; }
.foot ul a:hover { color: var(--color-pink); }
.foot__intro { max-width: 34ch; color: var(--color-ink-soft); margin-top: var(--space-4); }
.foot__bar { border-top: 1px solid var(--color-line); padding-block: var(--space-5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); font-size: var(--fs-small); color: var(--color-ink-soft); }
.foot .brand { color: var(--color-ink); }
.foot .brand__mark { color: var(--color-ink); }
.horizon { display: flex; height: 90px; margin-top: var(--space-6); }
.horizon span { flex: 1; }
.horizon .m1 { background: var(--color-peach); clip-path: polygon(0 100%, 50% 20%, 100% 100%); }
.horizon .m2 { background: var(--color-ochre); clip-path: polygon(0 100%, 60% 35%, 100% 100%); margin-left: -6%; }
.horizon .m3 { background: var(--color-lavender); clip-path: polygon(0 100%, 40% 10%, 100% 100%); margin-left: -6%; }
.horizon .m4 { background: var(--color-teal); clip-path: polygon(0 100%, 55% 45%, 100% 100%); margin-left: -6%; }

/* =====================================================================
   PAGE HEADER (interior pages)
   ===================================================================== */
.page-header { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 64px); }
.page-header .eyebrow { margin-bottom: var(--space-5); }
.page-header .display { max-width: 16ch; }
.page-header .lead { max-width: 60ch; margin-top: var(--space-5); }

/* small utilities */
.divider { height: 1px; background: var(--color-line); border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--color-line); background: var(--color-surface); border-radius: var(--radius-pill); padding: 8px 16px; font-weight: 500; font-size: 0.92rem; }
.pill-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tabs a { border-radius: var(--radius-pill); padding: 9px 18px; font-weight: 600; font-size: 0.92rem; background: var(--color-surface); border: 1px solid var(--color-line); }
.pill-tabs a[aria-current="true"] { background: var(--color-ink); color: var(--color-on-dark); border-color: var(--color-ink); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* =====================================================================
   ELEMENTOR COMPATIBILITY
   ===================================================================== */
/* Elementor wraps edited content in .elementor; let sections/containers
   run full width the same way our own .section / .wrap pattern does. */
.elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--wrap); }
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-display); }
