/* =====================================================================
   layout.css — structural layout: header, hero, sections, grids, footer
   ===================================================================== */

/* ---------- Header --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

/* Elevation once the page is scrolled (toggled by header.js). */
.site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(46, 15, 63, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  /* The header must never force a horizontal scrollbar on small phones:
   * the brand is allowed to shrink, everything else is compacted below. */
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--purple-900);
  margin-right: auto;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple-800), var(--magenta-600));
  color: var(--white);
  flex: none;
}

.brand-mark .icon { width: 1.3rem; height: 1.3rem; }

.brand-text {
  display: grid;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--purple-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.2rem);
}

.nav-list a {
  display: inline-block;
  padding: 0.4rem 0.2rem;
  color: var(--charcoal-700);
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  /* Never shrink: the brand (which ellipsizes) gives up the space instead,
     so the icon buttons below keep their full tap target. */
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  flex: none;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--charcoal-500);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.lang-btn[aria-pressed="true"] {
  background: var(--purple-900);
  color: var(--white);
}

/* Language names in full; the two-letter code is swapped in below 460px
   (see the media block at the end of this file) so the header always fits. */
.lang-code { display: none; }

.lang-sep { color: var(--charcoal-300); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  color: var(--purple-900);
  font-weight: 700;
  font-size: var(--step--1);
  /* Fixed 44px tap target: never squeezed by a neighbouring control. */
  flex: none;
  min-width: 44px;
  min-height: 44px;
}

/* ---------- Hero ----------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 480px at 88% -10%, rgba(224, 48, 110, 0.14), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(0, 137, 123, 0.12), transparent 60%),
    var(--cream-100);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  /* minmax(0, …): an fr track's 'auto' minimum is the column's min-content,
     so a long (nowrap) button could otherwise widen the whole page. */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.2rem, 6vw, 4.5rem);
}

.hero-title { margin-bottom: 0.4em; }

.hero-sub {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 1.6rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--charcoal-700);
  font-size: var(--step--1);
}

.hero-points .icon { color: var(--emerald-600); }

.hero-media { position: relative; }

.hero-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  background: var(--cream-200);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Generic sections ----------------------------------------- */
.section { padding-block: clamp(2.6rem, 6vw, 5rem); }

.section-alt { background: var(--cream-200); }

.section-head {
  text-align: center;
  max-width: 62ch;
  margin: 0 auto clamp(1.8rem, 4vw, 2.8rem);
}

.section-head-left { text-align: left; margin-inline: 0; }

.section-sub {
  color: var(--text-soft);
  font-size: var(--step-1);
}

.section-head-light h2,
.section-head-light .section-sub { color: var(--dark-text); }

.section-head-light .section-sub { color: var(--dark-text-soft); }

.section-head-light .eyebrow { color: var(--gold-500); }

/* Dark sections: gallery + contact */
.section-gallery,
.section-contact {
  background:
    radial-gradient(900px 380px at 100% 0%, rgba(224, 48, 110, 0.22), transparent 55%),
    linear-gradient(160deg, var(--purple-900), var(--purple-800));
  color: var(--dark-text);
}

/* ---------- Card grids ----------------------------------------------- */
.card-grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.services-grid { grid-template-columns: repeat(4, 1fr); }

.gallery-grid { grid-template-columns: repeat(4, 1fr); }

/* ---------- Why-us list ---------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

/* ---------- Steps ----------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
  counter-reset: step;
}

/* ---------- Enquiry --------------------------------------------------- */
.enquiry-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

/* ---------- About ----------------------------------------------------- */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.about-media { position: relative; }

.about-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-300);
}

.about-badges {
  position: absolute;
  left: 50%;
  bottom: -1.1rem;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  width: max-content;
  max-width: 92%;
}

.about-badges li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--purple-900);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

/* ---------- FAQ ------------------------------------------------------- */
.faq-list { display: grid; gap: 0.8rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.2rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;
  position: relative;
  padding: 0.9rem 2rem 0.9rem 0;
  font-weight: 700;
  color: var(--purple-900);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq-item p {
  padding: 0 0 1rem;
  color: var(--text-soft);
}

/* ---------- Contact grid --------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

/* ---------- Footer ---------------------------------------------------- */
.site-footer {
  background: var(--purple-900);
  color: var(--dark-text-soft);
  padding-top: clamp(2.4rem, 5vw, 3.6rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  padding-bottom: clamp(1.8rem, 4vw, 2.6rem);
}

.site-footer .brand-name { color: var(--white); }
.site-footer .brand-tag { color: var(--dark-text-soft); }

.footer-desc { font-size: var(--step--1); margin: 1rem 0; }

.footer-title {
  color: var(--white);
  font-size: var(--step-1);
  margin-bottom: 0.9rem;
}

.footer-col ul { display: grid; gap: 0.45rem; }

.footer-col a {
  color: var(--dark-text-soft);
  text-decoration: none;
  font-size: var(--step--1);
}

.footer-col a:hover { color: var(--white); text-decoration: underline; }

.footer-col span { font-size: var(--step--1); }

.footer-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--charcoal-300);
}

.footer-bottom {
  border-top: 1px solid var(--dark-line);
  padding-block: 1rem;
  font-size: var(--step--1);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.footer-lang { display: inline-flex; align-items: center; gap: 0.4rem; }

.site-footer .lang-btn { color: var(--dark-text-soft); }

.site-footer .lang-btn[aria-pressed="true"] {
  background: var(--white);
  color: var(--purple-900);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
  .services-grid,
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions,
  .hero-points { justify-content: center; }
  .hero-media { max-width: 420px; margin-inline: auto; width: 100%; }

  .enquiry-layout,
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  .section-head-left { text-align: center; margin-inline: auto; }
  .about-layout { gap: 2.4rem; }

  /* Mobile navigation: collapse into a toggle panel */
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Keep the header opaque while the menu panel is open over content. */
  .site-header.menu-is-open {
    background: var(--cream-100);
    backdrop-filter: none;
  }

  .nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.6rem var(--gutter) 1rem;
  }

  .nav.is-open .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav.is-open .nav-list a {
    padding: 0.75rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: var(--step-0);
  }

  .header-wa span { display: none; }
  .header-wa { padding-inline: 0.7rem; }

  /* Compact header on small screens so it always fits the viewport. */
  .header-inner { gap: 0.6rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-name { font-size: var(--step-0); }
  .lang-btn { padding: 0.3rem 0.5rem; }
  .lang-sep { display: none; }
  .lang-switch { gap: 0.15rem; }
  /* The toggle label is hidden below 760px, so make the button square. */
  .nav-toggle { padding: 0.45rem; }
}

@media (max-width: 760px) {
  .services-grid,
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle-label { display: none; }
}

@media (max-width: 560px) {
  .services-grid,
  .gallery-grid,
  .why-grid,
  .steps,
  .contact-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .brand-tag { display: none; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
}

/* On narrow phones the header language buttons show two-letter codes rather
 * than full names (the accessible names stay complete via aria-label).
 * NOTE: keep these narrow blocks in descending width order so the narrower
 * breakpoint is the one that wins if they ever overlap. */
@media (max-width: 460px) {
  .header-actions .lang-name { display: none; }
  .header-actions .lang-code { display: inline; }
}

/* 320px-class devices: the privacy note may hold a long unbroken string. */
@media (max-width: 420px) {
  .privacy-note { overflow-wrap: anywhere; }
}

@media (max-width: 400px) {
  /* Slightly smaller brand line + tighter gaps so the full shop name still
     fits alongside the actions at 360px. */
  .brand-name { font-size: 0.88rem; }
  .brand { gap: 0.5rem; }
  .lang-btn { padding: 0.3rem 0.45rem; font-size: 0.78rem; }
  .header-inner { gap: 0.3rem; }
  .header-actions { gap: 0.3rem; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark .icon { width: 1.05rem; height: 1.05rem; }
  .nav-toggle { padding: 0.4rem; }
  .header-wa { padding-inline: 0.6rem; }
}

/* One column for very narrow phones keeps cards readable */
@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
