/* ==========================================================================
   MIKOTO ACADEMY — layout.css
   Page shell (header / drawer / footer), hero variations, section scaffolding
   and responsive grid systems. Component-level styling lives in components.css
   ========================================================================== */

/* ==========================================================================
   1. HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* isolate so the blend-mode logo mixes with the header's own background,
     not with page content scrolling underneath the translucent bar */
  isolation: isolate;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
}

/* --- brand lockup ------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
  padding-top: 2px;
  box-shadow: 0 4px 14px var(--accent-soft);
}

/* Real logo mark — must follow .brand__mark so it wins the cascade at equal
   specificity. The supplied PNGs have genuine transparency, so the dolphin
   sits bare on the ivory bar: no red pill, no plate, no border.
   (Earlier opacity trouble came from the Google Drive CDN re-encoding the PNG
   to JPEG, which flattens alpha onto white. The genuine PNGs are now in use.) */
.brand__mark.brand__mark--logo {
  width: 46px;
  height: 46px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.brand__mark.brand__mark--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand__text { display: grid; line-height: 1.15; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.brand__sub {
  font-size: 0.63rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- desktop navigation ------------------------------------------------- */
.nav-main {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 1vw, 0.9rem);
  margin-inline-start: auto;
}

.nav-main__link {
  position: relative;
  padding: 0.5rem 0.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-main__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}

.nav-main__link:hover,
.nav-main__link:focus-visible { opacity: 1; color: var(--accent); }
.nav-main__link:hover::after { transform: scaleX(1); }

.nav-main__link[aria-current="page"] { opacity: 1; color: var(--accent); font-weight: 600; }
.nav-main__link[aria-current="page"]::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-inline-start: 0.4rem;
}

/* --- language toggle ---------------------------------------------------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  gap: 2px;
}

.lang-toggle__btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.62rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lang-toggle__btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

/* --- hamburger + mobile drawer ----------------------------------------- */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.nav-burger span {
  position: absolute; left: 50%; width: 19px; height: 2px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.32s var(--ease), opacity 0.2s var(--ease);
}
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 28px; }

.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateX(-50%) translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s var(--ease);
}

.nav-drawer.is-open { max-height: 78vh; overflow-y: auto; }

.nav-drawer__inner {
  padding: 1rem var(--gutter) 1.75rem;
  display: grid;
  gap: 0.15rem;
}

.nav-drawer__link {
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-drawer__link .kanji { font-size: 0.82rem; opacity: 0.45; letter-spacing: var(--ls-kanji); }
.nav-drawer__link[aria-current="page"] { color: var(--accent); }

.nav-drawer__foot { display: grid; gap: 0.6rem; margin-top: 1.25rem; }

/* ==========================================================================
   2. HERO — variation per theme
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--bg-deep);
  color: var(--hero-text);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img,
.hero__media .placeholder { width: 100%; height: 100%; object-fit: cover; }

/* While the photo slot is unfilled, keep the placeholder legible above the
   darkening overlay so the owner can see exactly which photo goes here.
   On the dark-stage layouts (A & C) the hero slot collapses to a small corner
   badge so the headline stays perfectly readable; the full slot description
   stays in the markup + README. In the editorial layout (B) the hero slot is a
   normal framed panel and shows the complete placeholder. */
.hero__media .placeholder { position: relative; z-index: 2; border-width: 0; }

html:not([data-theme="b"]) .hero__media .placeholder {
  background: transparent;
  padding: 0;
  min-height: 0;
  place-content: start start;
  text-align: left;
}

html:not([data-theme="b"]) .hero__media .placeholder .placeholder__label,
html:not([data-theme="b"]) .hero__media .placeholder .placeholder__meta,
html:not([data-theme="b"]) .hero__media .placeholder .placeholder__code { display: none; }

html:not([data-theme="b"]) .hero__media .placeholder__tag {
  justify-self: start;
  margin: clamp(0.9rem, 2.2vw, 1.4rem);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.82) 0%, rgba(7, 11, 20, 0.6) 45%, rgba(7, 11, 20, 0.9) 100%),
    radial-gradient(900px 620px at 78% 22%, rgba(200, 16, 46, 0.34), transparent 68%);
}

.hero__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(3.25rem, 9vw, 7rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
  position: relative;
  z-index: 2;
  text-align: var(--hero-align);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 1rem;
  border: 1px solid var(--border-on-deep);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-on-deep);
}

.hero__eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.25);
}

.hero__slogan {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  font-size: 0.86rem;
}
.hero__slogan span[lang="ja"] {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}
.hero__slogan span + span {
  color: var(--text-on-deep-muted);
  font-style: italic;
}
html[data-theme="b"] .hero__slogan span[lang="ja"] { color: var(--accent); }
html[data-theme="b"] .hero__slogan span + span { color: var(--text-muted); }

.hero__title {
  margin-top: clamp(1.1rem, 2.4vw, 1.7rem);
  font-size: var(--fs-hero);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero__title .line-1 {
  display: block;
  font-size: 0.42em;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-bottom: 0.55em;
  line-height: 1.5;
}

.hero__title em {
  font-style: normal;
  color: var(--accent-strong);
  position: relative;
  white-space: nowrap;
}

.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.06em;
  height: 0.14em;
  background: var(--accent-strong);
  opacity: 0.85;
}

.hero__lead {
  margin-top: clamp(1.1rem, 2vw, 1.6rem);
  max-width: 60ch;
  margin-inline: auto;
  font-size: clamp(0.98rem, 1.2vw, 1.14rem);
  line-height: 1.85;
  color: var(--text-on-deep-muted);
}

.hero__cta {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: var(--hero-align);
}

.hero__facts {
  margin-top: clamp(2.25rem, 4.5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border-on-deep);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border-on-deep);
  max-width: 720px;
  margin-inline: auto;
  text-align: left;
}

.hero__fact {
  background: rgba(7, 11, 20, 0.6);
  padding: clamp(0.9rem, 2vw, 1.4rem);
}

.hero__fact b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: var(--display-weight);
  line-height: 1.1;
  color: var(--text-on-deep);
}

.hero__fact b span { font-size: 0.5em; opacity: 0.75; margin-left: 0.15em; }

.hero__fact small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-deep-muted);
  line-height: 1.5;
}

/* --- HERO VARIATION A : Hinomaru Bold — centered, split-bg ------------- */
html[data-theme="a"] .hero__inner { max-width: 980px; }

/* --- HERO VARIATION B : Ivory Editorial — asymmetric split ------------- */
html[data-theme="b"] .hero {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="b"] .hero__media {
  position: relative;
  inset: auto;
  z-index: 1;
  margin: clamp(1.25rem, 3vw, 2.25rem) 0 0;
}

html[data-theme="b"] .hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas: "copy media";
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

html[data-theme="b"] .hero__media {
  grid-area: media;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-tint);
}

html[data-theme="b"] .hero__media img,
html[data-theme="b"] .hero__media .placeholder { height: 100%; }

html[data-theme="b"] .hero__media::after {
  background: linear-gradient(180deg, rgba(15, 33, 68, 0.06), rgba(15, 33, 68, 0.3));
}

html[data-theme="b"] .hero__inner {
  grid-area: copy;
  max-width: none;
  padding: 0;
  text-align: left;
}

html[data-theme="b"] .hero__eyebrow {
  border-color: var(--border);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

html[data-theme="b"] .hero__title { color: var(--text); }
html[data-theme="b"] .hero__lead { color: var(--text-muted); margin-inline: 0; }
html[data-theme="b"] .hero__cta { justify-content: flex-start; }
html[data-theme="b"] .hero__facts {
  max-width: none;
  margin-inline: 0;
  background: var(--border);
}
html[data-theme="b"] .hero__fact { background: var(--bg-card); }
html[data-theme="b"] .hero__fact b { color: var(--text); }
html[data-theme="b"] .hero__fact small { color: var(--text-muted); }

/* --- HERO VARIATION C : Kanji Modern — grid stage, huge type ---------- */
html[data-theme="c"] .hero__media::after {
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.72), rgba(7, 11, 20, 0.94)),
    radial-gradient(760px 560px at 20% 18%, rgba(127, 166, 255, 0.22), transparent 70%),
    radial-gradient(680px 560px at 84% 78%, rgba(224, 30, 56, 0.28), transparent 72%);
}

html[data-theme="c"] .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}

html[data-theme="c"] .hero__inner { max-width: 1040px; }

html[data-theme="c"] .hero__title {
  font-weight: 800;
  letter-spacing: -0.035em;
}

html[data-theme="c"] .hero__title .line-1 {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html[data-theme="c"] .hero__facts {
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="c"] .hero__fact {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

/* ==========================================================================
   3. KANJI DECORATION (尊・志・道・技能実習・特定技能)
   ========================================================================== */
.kanji-watermark {
  position: absolute;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text);
  opacity: var(--kanji-opacity);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: 0.02em;
}

.kanji-watermark--deep { color: var(--text-on-deep); opacity: 0.09; }

.kanji-watermark--tr {
  top: -0.18em; right: -0.06em;
  font-size: clamp(9rem, 24vw, 22rem);
}

.kanji-watermark--bl {
  bottom: -0.16em; left: -0.05em;
  font-size: clamp(8rem, 20vw, 18rem);
}

.kanji-accent {
  font-family: var(--font-serif);
  font-size: 0.78em;
  letter-spacing: var(--ls-kanji);
  color: var(--accent);
  font-weight: 600;
}

.kanji-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.kanji-chip i {
  font-family: var(--font-serif);
  font-style: normal;
  color: var(--accent);
  letter-spacing: var(--ls-kanji);
  font-size: 0.92rem;
}

/* ==========================================================================
   4. SECTION SCAFFOLDING
   ========================================================================== */
.section-head { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); position: relative; z-index: 1; }

.section-head--center { text-align: center; max-width: 720px; margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-head--center .eyebrow::after {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-title {
  margin-top: 0.7rem;
  font-size: var(--fs-h2);
  text-wrap: balance;
}

/* On deep (navy) sections the eyebrow must NOT use a navy token — that renders
   dark-blue-on-blue and is unreadable. `--accent` (hinomaru red) reads clearly
   on every theme's deep background, so it is used here instead. */
.section--deep .eyebrow { color: var(--accent-on-deep, var(--accent)); }

/* --- Deep-section readability -------------------------------------------------
   On navy stages (`--bg-deep`: the home "Alur Pendaftaran" band, Tentang's
   "Kemitraan", Program's SSW block, Fasilitas' "Lokasi"), the light-theme muted
   tokens resolve to dark slate/navy and become unreadable dark-on-dark. Any
   text that defaults to `--text-muted` / `--border` must be re-pointed at the
   on-deep tokens. Add new component classes here when they land on a deep band. */
.section--deep .section-lead,
.section--deep .step__text,
.section--deep .bullet-list,
.section--deep .num-list,
.section--deep .card__text { color: var(--text-on-deep-muted); }

/* A logo figure sitting inside a deep band (Tentang > Kemitraan): the caption
   keeps its light-plate treatment but the text must be readable on the navy. */
.section--deep .figure--logo { border-color: var(--border-on-deep); }
.section--deep .figure--logo figcaption {
  background: rgba(255, 255, 255, 0.06);
  border-top-color: var(--border-on-deep);
  color: var(--text-on-deep-muted);
}

.section--deep .step__time {
  color: var(--text-on-deep-muted);
  border-color: var(--border-on-deep);
}

.section--deep .step,
.section--deep .step:last-child { border-color: var(--border-on-deep); }

.section--deep .badge--neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-deep-muted);
  border-color: var(--border-on-deep);
}

.section--deep .step__num { background: transparent; }

.section-lead {
  margin-top: 0.9rem;
  max-width: 62ch;
  color: var(--text-muted);
  line-height: 1.85;
}

.section-head--center .section-lead { margin-inline: auto; }
.section--deep .section-lead { color: var(--text-on-deep-muted); }

.rule-accent {
  width: 64px; height: 3px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  margin-top: 1.15rem;
}
.section-head--center .rule-accent { margin-inline: auto; }

/* ==========================================================================
   5. GRIDS
   ========================================================================== */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); position: relative; z-index: 1; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-on-deep-muted);
  padding-top: clamp(2.75rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.15fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.site-footer .brand__name { color: var(--text-on-deep); }
.site-footer .brand__sub { color: var(--text-on-deep-muted); }

/* The footer sits on deep navy, where multiply would sink the navy wordmark
   into the background — so here the wordmark gets an explicit light plate. */
.footer-brand { display: inline-block; text-decoration: none; }
.footer-brand__logo {
  display: block;
  width: clamp(190px, 22vw, 250px);
  height: auto;
  background: #fff;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transition: transform var(--dur) var(--ease);
}
.footer-brand:hover .footer-brand__logo { transform: translateY(-2px); }

.footer-about { margin-top: 1.1rem; font-size: 0.9rem; line-height: 1.85; max-width: 34ch; }

.footer-title {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-on-deep);
  margin-bottom: 1rem;
}

.footer-list { display: grid; gap: 0.6rem; font-size: 0.9rem; }
.footer-list a { transition: color 0.25s var(--ease); }
.footer-list a:hover { color: var(--accent-strong); }

.footer-contact { display: grid; gap: 0.75rem; font-size: 0.9rem; }
.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; line-height: 1.6; }
.footer-contact svg { flex-shrink: 0; margin-top: 0.22rem; opacity: 0.85; }

.footer-slogan {
  margin-top: 1rem;
  display: grid;
  gap: 0.15rem;
}
.footer-slogan__ja {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-on-deep);
  letter-spacing: 0.08em;
}
.footer-slogan__id {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--accent-strong);
  letter-spacing: 0.02em;
}

.footer-social { display: flex; gap: 0.5rem; margin-top: 1.1rem; }

.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border-on-deep);
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.footer-legal {
  border-top: 1px solid var(--border-on-deep);
  padding-block: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  position: relative;
  z-index: 1;
}

.footer-legal__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }

/* ==========================================================================
   7. FLOATING ACTION (WhatsApp) + TWEAKS PANEL
   ========================================================================== */
.fab-wa {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 1.6rem);
  bottom: clamp(0.9rem, 2.5vw, 1.6rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border-radius: var(--radius-pill);
  background: #22C55E;
  color: #06280F;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: transform 0.28s var(--ease);
}
.fab-wa:hover { transform: translateY(-3px) scale(1.02); }
.fab-wa svg { width: 20px; height: 20px; }

.tweaks {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 1.6rem);
  bottom: calc(0.9rem + 58px);
  z-index: 95;
  width: min(330px, calc(100vw - 1.8rem));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--text);
}

html[data-theme="c"] .tweaks { background: #121C30; }

.tweaks__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.tweaks__toggle span:last-child {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tweaks__body {
  border-top: 1px solid var(--border);
  padding: 1rem 1.05rem 1.15rem;
  display: grid;
  gap: 1.05rem;
  max-height: min(66vh, 560px);
  overflow-y: auto;
}

.tweaks__group > b {
  display: block;
  font-size: 0.68rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.tweaks__options { display: grid; gap: 0.45rem; }

.tweaks__opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.tweaks__opt[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tweaks__swatch {
  width: 30px; height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.tweaks__swatch i { display: block; }

.tweaks__opt-text { display: grid; line-height: 1.25; }
.tweaks__opt-text b { font-size: 0.83rem; }
.tweaks__opt-text small { font-size: 0.72rem; color: var(--text-muted); }

.tweaks__note {
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 0.85rem;
}

.tweaks__reset {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.tweaks.is-collapsed .tweaks__body { display: none; }

/* ==========================================================================
   8. REVEAL ANIMATION
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-main { display: none; }
  .nav-burger { display: block; }
  .nav-drawer { display: block; }
  .header-actions { margin-inline-start: auto; }
  .nav-burger { margin-inline-start: 0.25rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  html[data-theme="b"] .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media";
  }
  html[data-theme="b"] .hero__media { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .brand__sub { display: none; }
  .hero__facts { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .fab-wa span { display: none; }
  .fab-wa { padding: 0.85rem; }
  .tweaks { bottom: calc(0.9rem + 62px); }
}

/* Keep the header on one line on narrow phones: the primary CTA lives in the
   drawer and in the page body, so it is dropped from the bar itself.
   NOTE: `.site-header` prefix is required — components.css loads after this
   file and its `.btn` rule would otherwise win at equal specificity. */
@media (max-width: 760px) {
  .site-header .btn--header-cta { display: none; }
  .header-inner { gap: 0.5rem; }
  .lang-toggle__btn { padding: 0.3rem 0.5rem; }
}
