/*
Theme Name: CloudTZ
Theme URI: https://cloudtz.tz.co.tz
Author: Shaiya Che Madunda
Description: Custom theme for CloudTZ: hosting, web design, SEO, video and photography for Tanzanian businesses. Pricing, domains, bundle and contact details are edited under Appearance > CloudTZ Settings.
Version: 1.5.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cloudtz
*/

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ocean: #0a2a43;
  --ocean-2: #123b5c;
  --ocean-3: #1b4d75;
  --lagoon: #19b5a5;
  --lagoon-dark: #0e7d72;
  --sun: #ffc22e;
  --mist: #eef4f6;
  --white: #ffffff;
  --muted-dark: rgba(255, 255, 255, 0.74);
  --muted-light: #46606f;
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-light: rgba(10, 42, 67, 0.16);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --radius: 14px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ocean);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
p { margin: 0 0 1em; max-width: 62ch; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--sun); color: var(--ocean); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }

/* ---------- Sections ---------- */
.band { padding-block: var(--section); }
.band--dark { background: var(--ocean); color: var(--white); }
.band--mist { background: var(--mist); }
.band--dark .lead { color: var(--muted-dark); }
.lead { font-size: 1.2rem; color: var(--muted-light); max-width: 56ch; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 46rem; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn--sun { background: var(--sun); color: var(--ocean); }
.btn--sun:hover { background: #ffd05a; }
.btn--ghost { border-color: var(--line-dark); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); }
.btn--dark { background: var(--ocean); color: var(--white); }
.btn--dark:hover { background: var(--ocean-2); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 42, 67, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand .custom-logo { max-height: 40px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); color: var(--white); border-radius: 10px; padding: 0.5rem 0.8rem; cursor: pointer; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav ul { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.98rem; opacity: 0.9; }
.nav ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--sun); }
.nav .btn { padding: 0.6rem 1.15rem; opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--ocean); color: var(--white);
  padding-block: clamp(4rem, 10vw, 8rem) clamp(4rem, 9vw, 7rem);
  isolation: isolate;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; max-width: 20ch; margin-bottom: 0.35em; }
.hero .lead { color: var(--muted-dark); margin-bottom: 1.75rem; }

.addr { max-width: 760px; }
.addr__bar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--white); color: var(--ocean);
  border-radius: 999px; padding: 0.45rem 0.45rem 0.45rem 1.4rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.addr__lock { width: 20px; height: 20px; flex: none; color: var(--lagoon-dark); }
.addr__input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  padding: 0.7rem 0.4rem; letter-spacing: -0.01em;
}
.addr__input::placeholder { color: #7d93a1; }
.addr__bar:focus-within { outline: 3px solid var(--sun); outline-offset: 3px; }
.addr__bar .btn { padding-inline: 1.6rem; }
.tlds { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.tld {
  border: 1px solid var(--line-dark); background: transparent; color: var(--white);
  border-radius: 999px; padding: 0.45rem 0.95rem; cursor: pointer; font-weight: 600; font-size: 0.95rem;
  transition: background-color 0.18s, border-color 0.18s;
}
.tld:hover { border-color: var(--white); }
.tld[aria-pressed="true"] { background: var(--sun); color: var(--ocean); border-color: var(--sun); }
.tld small { font-weight: 500; opacity: 0.8; margin-left: 0.35rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; margin-top: 1.5rem; }
.hero__actions span { color: var(--muted-dark); }

/* ---------- Services index ---------- */
.index { border-top: 1px solid var(--line-light); }
.index__row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 1.5rem 2.5rem; align-items: center;
  padding: 1.7rem 0; border-bottom: 1px solid var(--line-light); text-decoration: none;
  transition: background-color 0.18s, padding 0.18s;
}
.index__row:hover { background: var(--white); padding-inline: 1.25rem; }
.index__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; }
.index__desc { color: var(--muted-light); margin: 0; }
.index__price { font-weight: 700; white-space: nowrap; }
.index__price small { display: block; font-weight: 500; color: var(--muted-light); }

/* ---------- Pricing ---------- */
.pricing-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.pricing-top .section-head { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line-dark); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; color: var(--white); padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ocean); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; padding: 2rem 1.75rem;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-dark); border-radius: 20px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.plan--featured { background: rgba(255, 255, 255, 0.13); border: 2px solid var(--sun); position: relative; }
.plan__flag { position: absolute; top: -0.9rem; left: 1.75rem; background: var(--sun); color: var(--ocean); font-weight: 800; font-size: 0.85rem; padding: 0.25rem 0.8rem; border-radius: 999px; }
.plan h3 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.plan__tag { color: var(--muted-dark); margin-bottom: 1.25rem; }
.plan__price { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 3.6vw, 2.8rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.3rem; }
.plan__per { color: var(--muted-dark); font-size: 0.95rem; margin-bottom: 1.5rem; }
.plan__list { margin-bottom: 2rem; flex: 1; }
.plan__list li { padding: 0.55rem 0 0.55rem 1.8rem; border-top: 1px solid var(--line-dark); position: relative; }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem; width: 0.9rem; height: 0.5rem;
  border-left: 2.5px solid var(--lagoon); border-bottom: 2.5px solid var(--lagoon); transform: rotate(-45deg);
}
.pricing-note { margin-top: 1.5rem; color: var(--muted-dark); font-size: 0.95rem; }

/* ---------- Work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.chip { border: 1px solid var(--line-light); background: var(--white); border-radius: 999px; padding: 0.45rem 1.05rem; cursor: pointer; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ocean); color: var(--white); border-color: var(--ocean); }
.work { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.tile { position: relative; grid-column: span 4; min-height: 280px; border-radius: var(--radius); overflow: hidden; color: var(--white); display: flex; align-items: flex-end; text-decoration: none; background: var(--ocean-2); }
.tile:nth-child(1), .tile:nth-child(4) { grid-column: span 7; }
.tile:nth-child(2), .tile:nth-child(3) { grid-column: span 5; }
.tile:nth-child(5), .tile:nth-child(6) { grid-column: span 6; }
.tile[hidden] { display: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__art { position: absolute; inset: 0; }
.tile__body { position: relative; width: 100%; padding: 1.4rem; background: linear-gradient(0deg, rgba(10, 42, 67, 0.92), rgba(10, 42, 67, 0)); }
.tile__body strong { display: block; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.02em; }
.tile__body span { color: var(--muted-dark); font-size: 0.95rem; }
.tile--web .tile__art { background: radial-gradient(circle at 80% 20%, var(--lagoon) 0 12%, transparent 13%), linear-gradient(135deg, var(--ocean-3), var(--ocean-2)); }
.tile--video .tile__art { background: radial-gradient(circle at 30% 30%, var(--sun) 0 9%, transparent 10%), linear-gradient(160deg, #1b4d75, #0a2a43); }
.tile--photo .tile__art { background: radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.28) 0 14%, transparent 15%), linear-gradient(200deg, var(--lagoon-dark), var(--ocean-2)); }
.work-note { margin-top: 1.25rem; color: var(--muted-light); font-size: 0.95rem; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step { border-top: 3px solid var(--ocean); padding-top: 1.1rem; counter-increment: step; }
.step::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--lagoon-dark); line-height: 1; margin-bottom: 0.6rem; }
.step h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.step p { color: var(--muted-light); margin: 0; }

/* ---------- Bundle ---------- */
.bundle { background: var(--sun); color: var(--ocean); padding-block: clamp(3rem, 7vw, 5rem); }
.bundle__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem 4rem; align-items: center; }
.bundle h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.bundle__list { margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bundle__list li { border: 2px solid var(--ocean); border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 700; }
.bundle__price { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 1rem; }

/* ---------- Proof (hidden until filled) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; }
.stat span { color: var(--muted-light); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.quote { margin: 0; padding: 1.75rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line-light); }
.quote p { font-size: 1.12rem; }
.quote footer { color: var(--muted-light); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; border-top: 1px solid var(--line-light); }
.faq details { border-bottom: 1px solid var(--line-light); }
.faq summary { cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--lagoon-dark); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted-light); padding-bottom: 1.25rem; margin: 0; }

/* ---------- Quote form ---------- */
.quote-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem 5rem; align-items: start; }
.quote-grid h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.form { display: grid; gap: 1.1rem; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend, .form label.lbl { font-weight: 700; margin-bottom: 0.5rem; display: block; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checks label { position: relative; cursor: pointer; }
.checks input { position: absolute; opacity: 0; inset: 0; }
.checks span { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--line-dark); border-radius: 999px; font-weight: 600; transition: background-color 0.15s, color 0.15s; }
.checks input:checked + span { background: var(--sun); color: var(--ocean); border-color: var(--sun); }
.checks input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea, .form select {
  width: 100%; padding: 0.8rem 1rem; border-radius: 12px; border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.08); color: var(--white);
}
.form select option { color: var(--ocean); }
.form ::placeholder { color: rgba(255, 255, 255, 0.5); }
.form textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form__status { min-height: 1.5em; font-weight: 600; margin: 0; }
.form__status[data-state="error"] { color: #ffb4a8; }
.form__status[data-state="ok"] { color: var(--sun); }
.form__alt { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ocean); color: var(--white); padding-block: 4rem 2rem; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.footer-grid h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-grid a { text-decoration: none; color: var(--muted-dark); }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-grid p { color: var(--muted-dark); }
.footer-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font-size: 0.92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }

/* ---------- Generic content ---------- */
.content { padding-block: var(--section); }
.content .entry > * { max-width: 70ch; }
.content h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .bundle__grid, .quote-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .index__row { grid-template-columns: 1fr; gap: 0.5rem; }
  .index__row:hover { padding-inline: 0; }
  .tile, .tile:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; background: var(--ocean);
    padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line-dark);
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line-dark); }
  .nav .btn { margin-top: 1rem; }
  .nav .lang-switch { margin-top: 1rem; align-self: flex-start; }
}
@media (max-width: 600px) {
  .addr__bar { flex-wrap: wrap; border-radius: 22px; padding: 0.6rem 0.8rem; }
  .addr__lock { display: none; }
  .addr__input { flex-basis: 100%; }
  .addr__bar .btn { width: 100%; }
  .steps, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .tile, .tile:nth-child(n) { grid-column: span 12; min-height: 220px; }
}

/* ---------- Motion: one hero moment, respects user settings ---------- */
.addr__caret { display: inline-block; width: 2px; height: 1.2em; background: var(--lagoon-dark); margin-left: 1px; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Inner pages: services and work ---------- */
.page-hero { background: var(--ocean); color: var(--white); padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 5.6vw, 4.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.03; max-width: 20ch; }
.page-hero .lead { color: var(--muted-dark); margin-bottom: 2rem; }
.page-hero .hero__actions { margin-top: 0; }
.crumb { margin: 0 0 1.25rem; font-weight: 600; font-size: 0.95rem; color: var(--muted-dark); }
.crumb a { text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.crumb a:hover { color: var(--white); border-color: var(--white); }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2.5rem 5rem; align-items: start; }
.split .section-head { margin-bottom: 0; }
.check-list li { position: relative; padding: 0.9rem 0 0.9rem 2.1rem; border-bottom: 1px solid var(--line-light); }
.check-list li:first-child { border-top: 1px solid var(--line-light); }
.check-list li::before {
  content: ""; position: absolute; left: 0.15rem; top: 1.2rem; width: 0.95rem; height: 0.5rem;
  border-left: 3px solid var(--lagoon-dark); border-bottom: 3px solid var(--lagoon-dark); transform: rotate(-45deg);
}

.chip--link { display: inline-block; text-decoration: none; }
.chip--link[aria-current="page"] { background: var(--ocean); color: var(--white); border-color: var(--ocean); }
.project { max-width: 880px; }
.project__image { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; }
.project__image img { width: 100%; height: auto; }

.work--three .tile:nth-child(n) { grid-column: span 4; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .work--three .tile:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 600px) {
  .work--three .tile:nth-child(n) { grid-column: span 12; min-height: 220px; }
}

/* ======================================================================
   Background media system (see inc/bg-system.php)
   Modelled on the Chanua Safaris theme: a hero with video + image carousel,
   and an optional fixed site-wide background.
   ====================================================================== */

/* ---------- Hero stage: video, carousel, wash ---------- */
.hero {
  min-height: clamp(560px, calc(100svh - 72px), 800px);
  display: flex; align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(5.5rem, 8vw, 6.5rem);
}
.hero__content { position: relative; }
.hero__stage { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--ocean); }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__slides { position: absolute; inset: 0; }
.hero__slides--standby { display: none; }
.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero__slide.is-active { opacity: 1; }
/* Legibility: heavy on the text side, lighter where the picture should show. */
.hero__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 30%);
}

.hero__media-bar { position: absolute; left: 0; right: 0; bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero__media-bar--hidden { display: none; }
.hero__caption { color: var(--white); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--sun); padding-bottom: 2px; }
.hero__caption:hover { color: var(--sun); }
.hero__controls { display: flex; align-items: center; gap: 0.9rem; }
.hero__arrow {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--line-dark); background: rgba(10, 42, 67, 0.45); color: var(--white);
  transition: border-color 0.18s, background-color 0.18s;
}
.hero__arrow:hover { border-color: var(--white); background: rgba(10, 42, 67, 0.7); }
.hero__dots { display: flex; align-items: center; gap: 0.6rem; }
.hero__dot {
  position: relative; width: 10px; height: 10px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.75); background: transparent;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}
.hero__dot::before { content: ""; position: absolute; inset: -10px; } /* larger touch target */
.hero__dot.is-active { background: var(--sun); border-color: var(--sun); transform: scale(1.3); }

@media (max-width: 720px) {
  .hero__wash {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 100%);
  }
  .hero__media-bar { bottom: 1rem; }
  .hero__caption { font-size: 0.95rem; }
}

/* ---------- Site-wide background layer ---------- */
body.has-bg-media { background: transparent; }
.site-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ocean);
  /* A negative z-index fixed layer can vanish on mobile browsers without its own compositing layer. */
  transform: translateZ(0); -webkit-transform: translateZ(0); will-change: transform;
}
.site-bg__poster, .site-bg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.site-bg__poster { z-index: 1; opacity: 1; transition: opacity 0.4s ease; }
.site-bg__video { z-index: 0; opacity: 0; transition: opacity 0.4s ease; transform: translateZ(0); -webkit-transform: translateZ(0); }
.site-bg.is-ready .site-bg__video { opacity: 1; }
.site-bg.is-ready .site-bg__poster { opacity: 0; }
.site-bg.is-still .site-bg__video { opacity: 0; }
.site-bg.is-still .site-bg__poster { opacity: 1; }
.site-bg__overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.site-bg__overlay--none { background: transparent; }
.site-bg__overlay--light { background: rgba(0, 0, 0, 0.12); }
.site-bg__overlay--medium { background: rgba(0, 0, 0, 0.28); }
.site-bg__overlay--dark { background: rgba(0, 0, 0, 0.5); }

/* ==========================================================================
   Glass design (from the Chanua glass system)
   Active only when a background is on (body.has-bg-media): the built-in
   moving gradient, or your own video or image. Panels show it through them.
   ========================================================================== */
:root {
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --glass-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
  --glass-sheen: linear-gradient(135deg, rgba(255,255,255,.17) 0%, rgba(255,255,255,.05) 34%, rgba(255,255,255,.015) 62%, rgba(255,255,255,.09) 100%);
  --glass-tile: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
}
/* Slow drift on the built-in background so there is always something moving behind the glass. */
.site-bg__poster.is-default { animation: cz-drift 40s ease-in-out infinite alternate; }
@keyframes cz-drift {
  from { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
  to   { transform: scale(1.2) translate3d(1.5%, 1%, 0); }
}
@media (prefers-reduced-motion: reduce) { .site-bg__poster.is-default { animation: none; } }

/* Soft corners on the full-width bands (free edge only). */
.hero { border-radius: 0 0 var(--r-xl) var(--r-xl); }
.site-header { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.site-footer { border-radius: var(--r-xl) var(--r-xl) 0 0; }

/* Sections: the band itself is clear; its content box is the glass panel. */
body.has-bg-media .band,
body.has-bg-media .content,
body.has-bg-media .page-hero {
  background: transparent;
  color: var(--white);
  padding-block: clamp(0.7rem, 1.6vw, 1.25rem);
  --muted-light: rgba(255, 255, 255, 0.86);
  --line-light: rgba(255, 255, 255, 0.26);
  --lagoon-dark: #7fe9dc;
}
body.has-bg-media .page-hero { padding-top: clamp(1.5rem, 4vw, 3rem); }
body.has-bg-media .band > .wrap,
body.has-bg-media .content > .wrap,
body.has-bg-media .page-hero > .wrap {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.30);
  background: var(--glass-grain), var(--glass-sheen), rgba(20, 15, 8, 0.14);
  background-blend-mode: soft-light, normal, normal;
  -webkit-backdrop-filter: blur(30px) saturate(175%) brightness(.9);
          backdrop-filter: blur(30px) saturate(175%) brightness(.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .60),
    inset 1px 0 0 rgba(255, 255, 255, .24),
    inset 0 -1px 0 rgba(255, 255, 255, .06),
    inset 0 0 40px rgba(255, 255, 255, .04),
    0 0 0 1px rgba(0, 0, 0, .14),
    0 26px 60px -22px rgba(0, 0, 0, .55),
    0 3px 10px rgba(0, 0, 0, .18);
  padding: clamp(22px, 3.4vw, 48px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
body.has-bg-media .band--dark > .wrap { background-color: rgba(10, 30, 48, 0.24); }
body.has-bg-media .page-hero h1 { max-width: 22ch; }
/* Text that must not pick up the panel shadow. */
body.has-bg-media .btn, body.has-bg-media input, body.has-bg-media select, body.has-bg-media textarea,
body.has-bg-media .plan__flag, body.has-bg-media .chip, body.has-bg-media .tld, body.has-bg-media .admin-note { text-shadow: none; }

/* Links inside panels: warm and underlined, never the dark default. */
body.has-bg-media :is(.band, .content, .page-hero) :is(p, li, .legal__more, .contact-card) a:not(.btn):not(.chip) {
  color: #ffe08a; text-decoration: underline; text-underline-offset: 3px;
}
body.has-bg-media .legal__more a, body.has-bg-media .contact-card a { color: #ffe08a; }

/* Header and footer glass. */
body.has-bg-media .site-header {
  background: var(--glass-grain), var(--glass-sheen), rgba(10, 30, 48, 0.34);
  background-blend-mode: soft-light, normal, normal;
  -webkit-backdrop-filter: blur(26px) saturate(175%) brightness(.9);
          backdrop-filter: blur(26px) saturate(175%) brightness(.9);
  border-bottom: 1px solid rgba(255, 255, 255, .26);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08), 0 14px 34px -18px rgba(0, 0, 0, .55);
}
body.has-bg-media .site-footer {
  background: var(--glass-grain), var(--glass-sheen), rgba(10, 30, 48, 0.34);
  background-blend-mode: soft-light, normal, normal;
  -webkit-backdrop-filter: blur(26px) saturate(175%) brightness(.9);
          backdrop-filter: blur(26px) saturate(175%) brightness(.9);
  border-top: 1px solid rgba(255, 255, 255, .30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
  margin-top: clamp(0.7rem, 1.6vw, 1.25rem);
}
body.has-bg-media .hero { box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .6); }

/* Tiles: small pieces of glass inside a panel. No blur of their own (no glass on glass). */
body.has-bg-media :is(.plan, .contact-card, .quote, .stat, .step, .index__row) {
  background: var(--glass-tile);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 20px -12px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--white);
}
body.has-bg-media .plan--featured { border: 2px solid var(--sun); }
body.has-bg-media .contact-card p { color: rgba(255, 255, 255, .85); }
body.has-bg-media .step { border-top: 1px solid rgba(255, 255, 255, 0.22); padding: 1.25rem; }
body.has-bg-media .stat { padding: 1.1rem 1.25rem; }
body.has-bg-media .index { border-top: 0; display: grid; gap: 0.75rem; }
body.has-bg-media .index__row { border-bottom: 1px solid rgba(255, 255, 255, 0.22); padding: 1.1rem 1.4rem; }
body.has-bg-media .index__row:hover { background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.08)); padding-inline: 1.4rem; }
body.has-bg-media .quote { padding: 1.5rem; }

/* Work tiles: rounded photos with a glass plate at the foot. */
body.has-bg-media .tile { border-radius: 24px; }
body.has-bg-media .tile__body {
  width: auto; margin: 0 0.75rem 0.75rem; padding: 0.9rem 1.1rem; border-radius: var(--r-md);
  background: var(--glass-sheen), rgba(16, 12, 6, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

/* FAQ becomes a set of drawers: glass tiles with a gold rule, native <details>. */
body.has-bg-media .faq { border-top: 0; display: grid; gap: 0.75rem; }
body.has-bg-media .faq details {
  border: 1px solid rgba(255, 255, 255, 0.22); border-left: 3px solid var(--sun);
  border-radius: var(--r-md); background: var(--glass-tile);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 20px -12px rgba(0, 0, 0, .5);
}
body.has-bg-media .faq summary { padding: 1.1rem 3.2rem 1.1rem 1.25rem; border-radius: var(--r-md); }
body.has-bg-media .faq summary::after { right: 1.25rem; color: var(--sun); }
body.has-bg-media .faq summary:focus-visible { outline-offset: -4px; }
body.has-bg-media .faq details p { padding: 0 1.25rem 1.25rem; color: rgba(255, 255, 255, .88); }
body.has-bg-media .faq details[open] summary { border-bottom: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r-md) var(--r-md) 0 0; margin-bottom: 1rem; }

/* Controls, chips and form fields. */
body.has-bg-media .chip { background: rgba(255, 255, 255, 0.12); color: var(--white); border-color: rgba(255, 255, 255, .28); }
body.has-bg-media .chip[aria-pressed="true"],
body.has-bg-media .chip--link[aria-current="page"] { background: var(--sun); color: var(--ocean); border-color: var(--sun); }
body.has-bg-media .form input[type="text"], body.has-bg-media .form input[type="email"], body.has-bg-media .form input[type="tel"],
body.has-bg-media .form textarea, body.has-bg-media .form select {
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  border: 1px solid rgba(255, 255, 255, .26); border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
body.has-bg-media .checks span { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); }
body.has-bg-media .checks input:checked + span { background: var(--sun); border-color: var(--sun); }
body.has-bg-media .btn--dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .34); }
body.has-bg-media .btn--dark:hover { border-color: var(--white); }
body.has-bg-media .map-frame { border-radius: var(--r-lg); border-color: rgba(255, 255, 255, .28); }
body.has-bg-media .table-wrap { border-radius: var(--r-md); }
body.has-bg-media .seg { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
body.has-bg-media .lang-switch { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }

/* The yellow bundle stays a solid accent, as a rounded panel. */
body.has-bg-media .bundle { background: transparent; padding-block: clamp(0.7rem, 1.6vw, 1.25rem); }
body.has-bg-media .bundle > .wrap { background: var(--sun); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 56px); box-shadow: 0 26px 60px -26px rgba(0, 0, 0, .55); text-shadow: none; }
body.has-bg-media .bundle .btn--dark { background: var(--ocean); color: var(--white); border-color: transparent; }

/* Fewer, lighter blurs on small screens. */
@media (max-width: 760px) {
  body.has-bg-media .band > .wrap, body.has-bg-media .content > .wrap, body.has-bg-media .page-hero > .wrap {
    -webkit-backdrop-filter: blur(22px) saturate(170%) brightness(.9); backdrop-filter: blur(22px) saturate(170%) brightness(.9);
    border-radius: var(--r-lg);
  }
  body.has-bg-media .nav { background: rgba(10, 30, 48, 0.82); border-radius: 0 0 var(--r-lg) var(--r-lg); }
}

/* Old browsers without backdrop-filter get a solid, still legible panel. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.has-bg-media .band > .wrap, body.has-bg-media .content > .wrap, body.has-bg-media .page-hero > .wrap,
  body.has-bg-media .site-header, body.has-bg-media .site-footer { background: rgba(10, 42, 67, 0.9); }
}

/* ---------- VPS page ---------- */
.plans--four { grid-template-columns: repeat(4, 1fr); }
.plans--four .plan { padding: 1.75rem 1.4rem; }
.spec-list { margin-bottom: 1.75rem; flex: 1; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-dark); }
.spec-list span { color: var(--muted-dark); }
.spec-list strong { text-align: right; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.compare th, .compare td { padding: 1rem 1.25rem 1rem 0; vertical-align: top; border-bottom: 1px solid var(--line-light); }
.compare thead th { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.015em; border-bottom: 2px solid var(--ocean); }
.compare tbody th { font-weight: 700; width: 18%; }
.compare td { color: var(--muted-light); width: 41%; }
body.has-bg-media .compare thead th { border-bottom-color: var(--lagoon); }

@media (max-width: 1100px) {
  .plans--four { grid-template-columns: repeat(2, 1fr); max-width: none; }
}
@media (max-width: 760px) {
  .plans--four { grid-template-columns: 1fr; max-width: 520px; }
}

/* VPS prices stay on one line in the four-column layout. */
.plans--four .plan__price { font-size: clamp(1.6rem, 2.2vw, 1.95rem); white-space: nowrap; }
@media (max-width: 1100px) {
  .plans--four .plan__price { font-size: clamp(2rem, 4vw, 2.4rem); }
}

/* Contact page */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.contact-card { background: var(--white); border: 1px solid var(--line-light); border-radius: 18px; padding: 1.5rem; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.contact-card p { margin: 0 0 0.75rem; color: var(--muted-light); }
.contact-card a { font-weight: 700; color: var(--lagoon-dark); overflow-wrap: anywhere; }
.map-frame { margin-top: 1.5rem; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-light); }
.map-frame iframe { display: block; width: 100%; height: clamp(260px, 40vw, 420px); border: 0; }

/* Legal pages */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; letter-spacing: -0.01em; }
.legal p, .legal li { line-height: 1.7; }
.legal__date { color: var(--muted-light); font-size: 0.95rem; }
.legal__more { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-light); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.legal__more a { font-weight: 700; color: var(--lagoon-dark); }
.admin-note { background: #fff7dc; border: 1px solid var(--sun); border-radius: 12px; padding: 0.9rem 1.1rem; font-size: 0.95rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.footer-legal a { text-decoration: none; }
.footer-legal a:hover { color: var(--white); text-decoration: underline; }

/* Language link in the header */
.lang-switch { font-weight: 700; font-size: 0.92rem; text-decoration: none; padding: 0.45rem 0.8rem; border: 1px solid var(--line-dark); border-radius: 999px; white-space: nowrap; color: inherit; }
.lang-switch:hover { border-color: var(--lagoon); color: var(--lagoon); }

/* ==========================================================================
   v1.5.1 layout pass: clear hero, service cards, tighter section rhythm
   ========================================================================== */

/* Clear hero: no stage, no blue wash. The site background shows from the very top. */
body.has-bg-media .hero--clear { background: transparent; box-shadow: none; border-radius: 0; }
.hero--clear::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.04) 100%);
}
.hero--clear { min-height: clamp(520px, calc(100svh - 72px), 760px); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hero--clear .lead { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.hero--clear h1 { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
@media (max-width: 720px) {
  .hero--clear::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.35)); }
}

/* Services become a grid of cards instead of long rows. */
.index { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; border-top: 0; }
.index__row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem;
  padding: 1.4rem; border: 1px solid var(--line-light); border-radius: var(--r-lg, 22px);
  grid-template-columns: none; text-decoration: none;
}
.index__row:hover { padding-inline: 1.4rem; transform: translateY(-3px); }
.index__row { transition: transform 0.25s ease, background-color 0.2s; }
.index__name { font-size: clamp(1.3rem, 2vw, 1.55rem); }
.index__desc { flex: 1; font-size: 1rem; }
.index__price { margin-top: 0.4rem; padding-top: 0.8rem; border-top: 1px solid var(--line-light); width: 100%; white-space: normal; }
body.has-bg-media .index { border-top: 0; }
body.has-bg-media .index__row { padding: 1.4rem; border-bottom-color: rgba(255, 255, 255, 0.22); }
body.has-bg-media .index__row:hover { padding-inline: 1.4rem; }
body.has-bg-media .index__price { border-top-color: rgba(255, 255, 255, 0.22); }
@media (prefers-reduced-motion: reduce) { .index__row:hover { transform: none; } }

/* Tighter rhythm: smaller headings, less empty space inside the panels. */
.section-head { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.section-head .lead { font-size: 1.1rem; margin-bottom: 0; }
body.has-bg-media .band > .wrap, body.has-bg-media .content > .wrap, body.has-bg-media .page-hero > .wrap { padding: clamp(22px, 3vw, 40px); }
body.has-bg-media .band, body.has-bg-media .content, body.has-bg-media .page-hero { padding-block: clamp(0.6rem, 1.2vw, 1rem); }
body.has-bg-media .page-hero { padding-top: clamp(1.25rem, 3vw, 2.25rem); }
.filters { margin-bottom: 1.25rem; }
.quote-grid { gap: 2rem 3.5rem; }
.steps { gap: 1rem; }

/* Work tiles: photo fills the tile, with a gentle zoom. */
.tile img { transition: transform 0.6s ease; }
.tile:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .tile:hover img { transform: none; } }
.tile__art { z-index: 0; }
.tile img, .tile .tile__art { border-radius: inherit; }
.tile__body { z-index: 1; }

.index__row--cta { border-style: dashed; }
body.has-bg-media .index__row--cta { border-style: dashed; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.05); }
