/* ==========================================================================
   Himsuta Pools — stylesheet
   Palette is derived from the logo: glacier navy, meltwater teal, snow,
   and a single warm brass note taken from the sun glint on the logo water.
   ========================================================================== */

:root {
  --ink:        #0C2A46;   /* glacier navy — headings, footer, deep water */
  --ink-soft:   #163E63;
  --teal:       #12A2B8;   /* meltwater teal — primary accent */
  --teal-deep:  #0B7A8C;
  --brass:      #C08A3E;   /* warm glint — used sparingly, once per screen */
  --snow:       #FBFDFE;   /* page background */
  --glacier:    #E9F3F6;   /* panel background */
  --line:       #D3E2E8;
  --slate:      #56718A;   /* body text */
  --white:      #FFFFFF;

  --shell: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(12, 42, 70, .06), 0 6px 18px rgba(12, 42, 70, .06);
  --shadow-md: 0 2px 4px rgba(12, 42, 70, .06), 0 18px 44px rgba(12, 42, 70, .12);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-spec: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--snow);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { margin: 0 0 1.1em; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--glacier { background: var(--glacier); }
.section--ink { background: var(--ink); color: #C3D8E6; }
.section--ink h2, .section--ink h3 { color: var(--white); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- eyebrow: a plant-room nameplate, used as the section marker ---- */
.eyebrow {
  font-family: var(--font-spec);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--teal);
}
.section--ink .eyebrow { color: #6FD3E4; }
.section--ink .eyebrow::before { background: #6FD3E4; }

.lede { font-size: 1.1rem; max-width: 62ch; }

/* ---------- buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body);
  font-weight: 600; font-size: .95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-deep); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.btn--onink { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn--onink:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--wa { background: #1FA855; color: #fff; }
.btn--wa:hover { background: #17833F; }
.btn--sm { padding: 9px 16px; font-size: .85rem; }
.btn--block { width: 100%; }

/* ---------- header -------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: #A9C6DA;
  font-size: .82rem;
  font-family: var(--font-spec);
  letter-spacing: .03em;
}
.topbar .shell { display: flex; gap: 18px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 253, 254, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.15rem; letter-spacing: -.02em; }
.brand__tag { font-family: var(--font-spec); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 13px; border-radius: 999px;
  color: var(--ink); font-weight: 500; font-size: .93rem; text-decoration: none;
}
.nav a:hover { background: var(--glacier); text-decoration: none; }
.nav a.is-active { background: var(--ink); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.cart-btn {
  position: relative; background: transparent; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; font-weight: 600;
  font-size: .9rem; color: var(--ink); font-family: var(--font-body);
}
.cart-btn[data-count]:not([data-count="0"])::after {
  content: attr(data-count);
  position: absolute; top: -7px; right: -7px;
  background: var(--brass); color: #fff;
  font-family: var(--font-spec); font-size: .68rem;
  min-width: 21px; height: 21px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px;
}

.nav-toggle { display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ---------- hero — the signature: a live waterline over deep water --------- */
.hero {
  position: relative;
  background: linear-gradient(175deg, #0C2A46 0%, #0F3A5C 45%, #0B6B7E 100%);
  color: #DCEAF2;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute; inset: 0;
  background-image: url("../img/gallery/project-02.jpeg");
  background-size: cover; background-position: center;
  opacity: .30;
  z-index: -2;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(9,29,49,.94) 12%, rgba(9,29,49,.62) 58%, rgba(9,60,80,.35) 100%);
}
.hero .shell { padding-top: 108px; padding-bottom: 132px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 em { font-style: normal; color: #6FD3E4; }
.hero__lede { color: #C6DCEA; font-size: 1.16rem; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.waterline { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; line-height: 0; }
.waterline svg { width: 100%; height: 90px; display: block; }
.waterline .wave-a { animation: drift 14s linear infinite; }
.waterline .wave-b { animation: drift 22s linear infinite reverse; opacity: .55; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero__strip {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(255,255,255,.15);
  background: rgba(6,24,41,.55);
}
.hero__strip .shell {
  padding-top: 18px; padding-bottom: 18px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  font-family: var(--font-spec); font-size: .78rem; letter-spacing: .05em;
  color: #9EC2D6; text-transform: uppercase;
}
.hero__strip b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: #fff; letter-spacing: -.02em; }

/* ---------- cards --------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.card--flat { box-shadow: none; }

.list-check { list-style: none; padding: 0; margin: 0 0 1em; }
.list-check li { position: relative; padding-left: 26px; margin-bottom: 9px; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--teal); transform: rotate(45deg);
}

/* ---------- product cards ------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.chip {
  font-family: var(--font-body); font-size: .87rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.product {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.product:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product__thumb {
  aspect-ratio: 4 / 3; background: var(--glacier);
  display: grid; place-items: center; text-align: center;
  border-bottom: 1px solid var(--line);
  color: var(--teal-deep); font-family: var(--font-spec); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; padding: 16px;
  background-image: radial-gradient(circle at 30% 25%, rgba(18,162,184,.14), transparent 60%);
}
.product__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product__brand {
  font-family: var(--font-spec); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 6px;
}
.product__name { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.06rem; line-height: 1.25; margin-bottom: 8px; }
.product__desc { font-size: .92rem; margin-bottom: 14px; }
.product__specs { list-style: none; margin: 0 0 16px; padding: 0; font-family: var(--font-spec); font-size: .76rem; color: var(--ink-soft); }
.product__specs li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.product__price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.product__price b { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.product__price span { font-size: .78rem; color: var(--slate); }
.product__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.note {
  font-size: .85rem; background: var(--glacier); border-left: 3px solid var(--teal);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- catalog downloads --------------------------------------------- */
.catalog {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); text-decoration: none;
}
.catalog:hover { border-color: var(--teal); text-decoration: none; }
.catalog__icon {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  background: var(--glacier); color: var(--teal-deep);
  display: grid; place-items: center; font-family: var(--font-spec); font-size: .66rem; font-weight: 700;
}
.catalog__t { font-weight: 600; color: var(--ink); display: block; font-size: .95rem; }
.catalog__s { font-size: .8rem; color: var(--slate); }

/* ---------- gallery ------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--glacier); position: relative; }
.gallery img { width: 100%; height: 260px; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px; color: #fff; font-family: var(--font-spec);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(transparent, rgba(9,29,49,.85));
}
.video-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.video-row video { width: 100%; border-radius: var(--radius); background: #000; }

/* ---------- accordion ----------------------------------------------------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.acc__item + .acc__item { border-top: 1px solid var(--line); }
.acc__btn {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 54px 20px 22px; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--ink);
}
.acc__btn::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-spec); font-size: 1.3rem; color: var(--teal);
}
.acc__item.is-open .acc__btn::after { content: "\2212"; }
.acc__panel { display: none; padding: 0 22px 22px; font-size: .96rem; }
.acc__item.is-open .acc__panel { display: block; }

/* ---------- blog ---------------------------------------------------------- */
.post { display: flex; flex-direction: column; overflow: hidden; }
.post__cover { height: 190px; object-fit: cover; width: 100%; }
.post__meta { font-family: var(--font-spec); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }
.post__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post__body h3 { margin: 8px 0 10px; }

/* ---------- forms --------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .82rem; margin-top: 12px; }
.form-status { margin-top: 14px; font-size: .92rem; font-weight: 600; color: var(--teal-deep); }

/* ---------- cart drawer --------------------------------------------------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: #fff; z-index: 90; box-shadow: -20px 0 60px rgba(12,42,70,.22);
  transform: translateX(102%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer__head h3 { margin: 0; }
.drawer__close { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); line-height: 1; }
.drawer__items { flex: 1; overflow-y: auto; padding: 16px 22px; }
.drawer__foot { padding: 20px 22px; border-top: 1px solid var(--line); background: var(--glacier); }
.drawer__empty { color: var(--slate); font-size: .95rem; padding: 30px 0; text-align: center; }
.line-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.line-item__n { flex: 1; }
.line-item__n b { display: block; color: var(--ink); font-size: .93rem; font-family: var(--font-display); }
.line-item__n span { font-size: .8rem; }
.qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink); }
.qty output { font-family: var(--font-spec); font-size: .85rem; min-width: 20px; text-align: center; }
.line-item__rm { background: none; border: 0; color: #B44; cursor: pointer; font-size: .78rem; padding: 0; }
.cart-total { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-bottom: 14px; }
.overlay { position: fixed; inset: 0; background: rgba(12,42,70,.45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.overlay.is-open { opacity: 1; pointer-events: auto; }

/* ---------- footer -------------------------------------------------------- */
.site-footer { background: var(--ink); color: #9EBDD1; padding: 64px 0 26px; }
.site-footer h4 { color: #fff; font-family: var(--font-display); font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #C8DEEB; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .93rem; }
.footer-bottom {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; font-family: var(--font-spec);
}
.footer-logo { height: 54px; margin-bottom: 14px; background: #fff; border-radius: 10px; padding: 6px 10px; }

/* ---------- legal --------------------------------------------------------- */
.legal { max-width: 80ch; }
.legal h3 { margin-top: 34px; }
.legal ol, .legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* ---------- floating whatsapp -------------------------------------------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  background: #1FA855; color: #fff; border-radius: 999px;
  padding: 13px 20px; font-weight: 700; font-size: .92rem;
  box-shadow: 0 10px 30px rgba(31,168,85,.4); text-decoration: none;
}
.wa-float:hover { text-decoration: none; background: #17833F; }

/* ---------- routing ------------------------------------------------------- */
.route { display: none; }
.route.is-visible { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------------------------------------------------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero__strip .shell { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 760px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px; gap: 2px; display: none;
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 14px; border-radius: 10px; }
  .nav-toggle { display: block; }
  .site-header .shell { position: relative; flex-wrap: nowrap; }
  .brand__tag { display: none; }
  .topbar .shell { justify-content: center; text-align: center; font-size: .74rem; }
  .section { padding: 58px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .video-row { grid-template-columns: 1fr; }
  .hero .shell { padding-top: 66px; padding-bottom: 96px; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { right: 12px; bottom: 12px; padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
