/* ==========================================================================
   Layout chrome: top bar, header & navigation, footer, floating buttons, dialogs
   ========================================================================== */

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: var(--misty-200); font-size: .875rem; }
.topbar__inner { display: flex; justify-content: flex-end; }
.topbar__list { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 2rem; padding-block: .55rem; }
.topbar__list li, .topbar__list a { display: inline-flex; align-items: center; gap: .55rem; }
.topbar__list .icon { width: 1em; height: 1em; color: var(--gold-200); }
.topbar__list a { transition: color .25s; }
.topbar__list a:hover { color: #fff; }
@media (max-width: 760px) { .topbar__list .topbar__addr { display: none; } .topbar__inner { justify-content: center; } }
@media (max-width: 460px) { .topbar { font-size: .8rem; } .topbar__list { gap: .25rem 1.1rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid rgba(19, 52, 77, .09);
  transition: box-shadow .35s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 10px 34px -18px rgba(10, 31, 48, .45); }
.navbar { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); transition: height .35s var(--ease); }
.site-header.is-stuck .navbar { height: calc(var(--header-h) - 14px); }

/* Desktop: the logo hangs from the header on a white plate so its wordmark stays legible */
.brand { display: inline-flex; align-items: center; flex: none; }
.site-header > .navbar > .brand {
  align-self: flex-start; position: relative; z-index: 2; padding: 10px 16px 12px;
  background: #fff; border-radius: 0 0 16px 16px; box-shadow: 0 18px 34px -16px rgba(10, 31, 48, .55);
  transition: padding .35s var(--ease), box-shadow .35s;
}
.brand__logo { height: 150px; width: auto; transition: height .35s var(--ease); }
.site-header.is-stuck .brand__logo { height: 70px; }
.site-header.is-stuck > .navbar > .brand { padding: 6px 12px 8px; }

.nav { margin-left: auto; }
.nav__head, .nav__foot { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  position: relative; padding: .6rem 0;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; color: var(--navy);
}
.nav__link { white-space: nowrap; }
@media (min-width: 1061px) and (max-width: 1279px) { .nav__list { gap: clamp(.7rem, 1.2vw, 1.1rem); } .nav__link { font-size: .72rem; letter-spacing: .08em; } .navbar { gap: 1rem; } }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .25rem; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav__link:hover::after, .nav__item:focus-within > .nav__link::after { transform: scaleX(1); }
.nav__sub-toggle { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; color: var(--nordic-700); transition: transform .3s var(--ease); }
.nav__sub-toggle .icon { width: 1rem; height: 1rem; }
.nav__sub {
  position: absolute; top: 100%; left: -1rem; min-width: 220px; padding: .6rem;
  background: #fff; border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 24px 50px -20px rgba(10, 31, 48, .45);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.nav__sub a { display: block; padding: .7rem 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; color: var(--navy); border-radius: 4px; transition: background-color .2s, color .2s, padding .3s var(--ease); }
.nav__sub a:hover { background: var(--misty-100); color: var(--accent); padding-left: 1.3rem; }
.nav__sub--cols a { white-space: normal; }
@media (min-width: 1061px) { .nav__sub--cols { display: grid; grid-template-columns: repeat(2, minmax(250px, 1fr)); gap: 0 .4rem; min-width: 560px; left: -6rem; } }
/* 19-item FABRIC RANGE menu: three ruled columns, one line per name */
@media (min-width: 1061px) {
  .nav__sub--cols3 {
    --rule: rgba(19, 52, 77, .14);
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 880px; min-width: 0; left: -14rem; padding: .35rem 0 .5rem;
    border-radius: 0 0 12px 12px; border-top-width: 4px;
    background-image: linear-gradient(var(--rule), var(--rule)), linear-gradient(var(--rule), var(--rule));
    background-size: 1px calc(100% - 1.4rem), 1px calc(100% - 1.4rem);
    background-position: 33.333% .7rem, 66.666% .7rem; background-repeat: no-repeat; background-color: #fff;
  }
  .nav__sub--cols3 li { margin-inline: 1.1rem; border-bottom: 1px solid var(--rule); }
  .nav__sub--cols3 li:nth-child(3n+2), .nav__sub--cols3 li:nth-child(3n) { margin-left: 1.1rem; }
  .nav__sub--cols3 li:last-child { border-bottom: 0; }
  .nav__sub--cols3 a {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem; white-space: nowrap;
    padding: .82rem .5rem .82rem .2rem; font-size: .72rem; letter-spacing: .09em; border-radius: 0; position: relative;
  }
  .nav__sub--cols3 a::after { content: "→"; font-size: .95rem; letter-spacing: 0; color: var(--nordic-blue); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .3s var(--ease); }
  .nav__sub--cols3 a:hover { background: var(--blush); color: var(--navy); padding-left: .7rem; }
  .nav__sub--cols3 a:hover::after { opacity: 1; transform: none; }
  .nav__sub--cols3 a::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--nordic-blue); transform: scaleY(0); transition: transform .3s var(--ease); }
  .nav__sub--cols3 a:hover::before { transform: scaleY(1); }
}
@media (min-width: 1061px) and (max-width: 1240px) { .nav__sub--cols3 { width: 790px; left: -12rem; } .nav__sub--cols3 a { font-size: .66rem; letter-spacing: .06em; } }
.has-sub:hover > .nav__sub, .has-sub:focus-within > .nav__sub, .has-sub.is-open > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover > .nav__sub-toggle, .has-sub.is-open > .nav__sub-toggle { transform: rotate(180deg); }

.navbar__cta { margin-left: .5rem; padding: .45rem .45rem .45rem 1.3rem; font-size: .9rem; }
.navbar__cta .btn__arrow { width: 2.1rem; height: 2.1rem; }
.burger { display: none; width: 3rem; height: 3rem; border-radius: 50%; border: 1.5px solid rgba(19, 52, 77, .25); color: var(--navy); place-items: center; margin-left: auto; transition: background-color .3s, color .3s; }
.burger:hover { background: var(--navy); color: #fff; }
.burger .icon { width: 1.4rem; height: 1.4rem; }

.nav-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(10, 31, 48, .6); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }

/* Drawer navigation (tablet + mobile) */
@media (max-width: 1060px) {
  .burger { display: grid; }
  .navbar__cta { display: none; }
  .nav {
    position: fixed; top: 0; right: 0; z-index: 100; height: 100dvh; width: min(88vw, 400px);
    margin: 0; display: flex; flex-direction: column; background: #fff; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s linear .5s;
    box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .5);
  }
  .nav.is-open { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  .nav__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.4rem; border-bottom: 1px solid rgba(19, 52, 77, .1); }
  .nav__head .brand__logo { height: 62px; }
  .nav__close { width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--misty-100); color: var(--navy); transition: background-color .3s, color .3s, transform .4s var(--ease); }
  .nav__close:hover { background: var(--navy); color: #fff; transform: rotate(90deg); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .6rem 1.4rem; }
  .nav__item { flex-wrap: wrap; border-bottom: 1px solid rgba(19, 52, 77, .1); }
  .nav__link { flex: 1; padding: 1.05rem 0; font-size: .92rem; }
  .nav__link::after { display: none; }
  .nav__sub-toggle { width: 2.6rem; height: 2.6rem; }
  .nav__sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 .7rem 1rem; border: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.is-open > .nav__sub { display: block; }
  .nav__sub a { padding: .65rem .6rem; }
  .nav__foot { display: block; margin-top: auto; padding: 1.4rem; background: var(--misty-100); }
  .nav__contact { margin-top: 1.2rem; display: grid; gap: .7rem; font-size: .95rem; color: var(--ink-soft); }
  .nav__contact li, .nav__contact a { display: flex; gap: .7rem; align-items: center; }
  .nav__contact .icon { color: var(--nordic-700); }
}
@media (max-width: 1060px) {
  .site-header > .navbar > .brand { align-self: center; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .brand__logo { height: 60px; }
  .site-header.is-stuck .brand__logo { height: 52px; }
}
@media (max-width: 460px) { .brand__logo { height: 54px; } .site-header.is-stuck .brand__logo { height: 48px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--misty); font-size: 1.02rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr .8fr .8fr 1.4fr; gap: clamp(2rem, 4vw, 4rem); padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.footer__logo { display: inline-block; width: 188px; padding: 14px 16px; background: #fff; border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }
.footer__tagline { margin-top: 1.5rem; font-family: var(--ff-display); font-size: 1.55rem; font-weight: 600; line-height: 1.2; color: #fff; }
.footer__text { margin-top: .8rem; max-width: 34ch; color: var(--misty); }
.footer__h { position: relative; margin-bottom: 1.3rem; padding-bottom: .9rem; font-family: var(--ff-display); font-size: 1.55rem; font-weight: 600; color: #fff; }
.footer__h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.6rem; border-top: 2px dashed var(--gold); }
.footer__col ul { display: grid; gap: .6rem; }
.footer__col a { position: relative; transition: color .25s; }
.footer__col ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; border-top: 1px solid currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.footer__col a:hover { color: #fff; }
.footer__col ul a:hover::after { transform: scaleX(1); }
.footer__contact p { display: flex; gap: .85rem; align-items: flex-start; }
.footer__contact p + p { margin-top: .95rem; }
.footer__contact .icon { margin-top: .3em; color: var(--gold-200); }
.footer__bar { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: var(--misty); }
.footer__bar p { padding-block: 1.2rem; }
.footer__bar a { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .35); transition: color .25s, border-color .25s; }
.footer__bar a:hover { color: var(--gold-200); border-color: var(--gold-200); }
@media (max-width: 1000px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } .footer__bar { padding-bottom: 76px; } }

/* ---------- Floating contact buttons ---------- */
.float { position: fixed; z-index: 80; right: var(--sbw, 0px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.float__list { display: flex; flex-direction: column; gap: 8px; transition: transform .5s var(--ease), opacity .4s; }
.float__toggle {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  background: var(--navy); color: #fff; border-radius: 12px 0 0 12px;
  box-shadow: 0 10px 24px -10px rgba(10, 31, 48, .6);
  transition: background-color .3s;
}
.float__toggle:hover { background: var(--navy-500); }
.float__toggle .icon { width: 1.1rem; height: 1.1rem; transition: transform .4s var(--ease); }
.float.is-collapsed .float__toggle .icon { transform: rotate(180deg); }
.float.is-collapsed .float__list { transform: translateX(110%); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .5s var(--ease), opacity .4s, visibility 0s linear .5s; }

.float__btn {
  --w: 11rem;
  display: flex; align-items: center; gap: 1.1rem; height: 3.4rem; width: 3.4rem; padding: 0 0 0 .95rem;
  margin-left: auto; overflow: hidden; white-space: nowrap;
  border-radius: 16px 0 0 16px; color: #fff; font-size: .92rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 14px 28px -12px rgba(10, 31, 48, .55);
  transition: width .45s var(--ease), box-shadow .3s, filter .3s;
}
.float__btn .icon { width: 1.5rem; height: 1.5rem; flex: none; }
.float__btn span { opacity: 0; transition: opacity .25s; }
.float__btn:hover span, .float__btn:focus-visible span { opacity: 1; transition-delay: .12s; }
.float__btn:hover, .float__btn:focus-visible { width: var(--w); filter: brightness(1.06); box-shadow: 0 18px 32px -12px rgba(10, 31, 48, .65); }
.float__btn--wa { background: #1B9A52; --w: 10.5rem; }
.float__btn--ig { background: linear-gradient(135deg, #7A3AB8 0%, #C2307A 55%, #E4682F 100%); --w: 12.5rem; }
.float__btn--enq { background: var(--accent); --w: 9.5rem; }

@media (max-width: 720px) {
  /* compact row in the bottom-right corner: keeps the hero call-to-action and page copy clear */
  .float { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); right: 12px; transform: none; flex-direction: row; align-items: center; gap: 8px; }
  .float__list { flex-direction: row; gap: 8px; }
  .float__btn { width: 2.9rem; height: 2.9rem; padding: 0; justify-content: center; border-radius: 50%; margin: 0; }
  .float__btn .icon { width: 1.35rem; height: 1.35rem; }
  .float__btn span { display: none; }
  .float__btn:hover, .float__btn:focus-visible { width: 2.9rem; }
  .float__toggle { order: -1; width: 2rem; height: 2rem; border-radius: 50%; }
  .float.is-collapsed .float__list { transform: translateX(40px) scale(.8); }
}

/* ---------- Enquiry dialog (one common form) ---------- */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(10, 31, 48, .66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .35s ease both; }
dialog.is-closing::backdrop { animation: fade .26s ease reverse both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: translateY(18px) scale(.97); } }

.enquiry { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .75); overflow: hidden; }
.enquiry[open] { animation: pop .5s var(--ease) both; }
.enquiry.is-closing { animation: popOut .26s ease both; }
.enquiry__panel { position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border-top: 5px solid var(--navy); background:
  radial-gradient(120% 60% at 100% 0%, var(--blush) 0%, transparent 55%), #fff; }
.enquiry__form, .enquiry__done { padding: clamp(1.5rem, 4vw, 2.4rem); }
.enquiry__close, .lightbox__close { position: absolute; z-index: 3; top: .9rem; right: .9rem; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: 0 8px 18px -8px rgba(10, 31, 48, .6); transition: background-color .3s, transform .4s var(--ease); }
.enquiry__close:hover, .lightbox__close:hover { background: var(--accent); transform: rotate(90deg); }
.enquiry__title { font-family: var(--ff-display); font-size: clamp(2.2rem, 1.6rem + 1.6vw, 2.9rem); line-height: 1; font-weight: 600; color: var(--heading-color); }
.enquiry__lead { margin: .8rem 0 1.3rem; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); max-width: 52ch; }
.enquiry .eyebrow { margin-bottom: .7rem; }
.enquiry .eyebrow [data-enq-type] { padding: .25rem .8rem; border-radius: 99px; background: var(--navy); color: #fff; letter-spacing: .14em; font-size: .72rem; }

.enquiry__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
.field { position: relative; display: block; margin: 0; }
.field--full { grid-column: 1 / -1; }
.field span { display: block; margin-bottom: .3rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nordic-700); }
.field span b { color: var(--accent); }
.field input, .field textarea {
  width: 100%; padding: .75rem .95rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid rgba(19, 52, 77, .2); border-radius: 10px; transition: border-color .25s, box-shadow .25s;
}
.field input:hover, .field textarea:hover { border-color: rgba(19, 52, 77, .45); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(19, 52, 77, .1); }
.field textarea { resize: vertical; min-height: 5rem; }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .1); }
.field__msg { display: block; margin-top: .25rem; font-style: normal; font-size: .82rem; font-weight: 600; color: #B3261E; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry__alert { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; background: #FBEAE8; border: 1px solid #E8B4AF; color: #8A1F18; font-size: .95rem; font-weight: 600; line-height: 1.5; }
.enquiry__submit { margin-top: 1.2rem; }
.enquiry__submit:disabled { opacity: .7; cursor: progress; }

.enquiry__done { text-align: center; padding-block: clamp(2.4rem, 6vw, 3.6rem); }
.enquiry__done[hidden], .enquiry__form[hidden], .enquiry__alert[hidden] { display: none; }
.enquiry__done .enquiry__lead { margin-inline: auto; }
.enquiry__tick { width: 4rem; height: 4rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--gold-200); animation: pop .6s var(--ease) both; }
.enquiry__tick .icon { width: 1.8rem; height: 1.8rem; stroke-width: 2.4; }
@media (max-width: 560px) { .enquiry__grid { grid-template-columns: 1fr; } .enquiry { border-radius: 14px; } }

/* ---------- Lightbox ---------- */
.lightbox { width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: clamp(1.4rem, 4vw, 2.4rem); border: 0; border-radius: 16px; background: #fff; text-align: center; overflow: auto; }
.lightbox[open] { animation: rise .5s var(--ease); }
.lightbox__img { margin: 1rem auto 0; max-height: 62dvh; width: auto; max-width: 100%; object-fit: contain; }
.lightbox__cap { margin-top: 1rem; font-family: var(--ff-display); font-size: 1.8rem; font-weight: 600; color: var(--navy); }

/* phones and small tablets only: roomier footer link tap targets */
@media (max-width: 760px) {
  .footer__col ul { gap: 0; }
  .footer__col ul a { display: inline-block; padding-block: .5rem; }
}

/* Header with seven items + Connect: tighter spacing so the row never overflows */
@media (min-width: 1280px) { .nav__list { gap: clamp(.9rem, 1.25vw, 1.4rem); } .nav__link { font-size: .78rem; letter-spacing: .1em; } .navbar { gap: 1.1rem; } .navbar__cta { margin-left: .2rem; } }
@media (min-width: 1061px) and (max-width: 1279px) { .nav__list { gap: .6rem; } .nav__link { font-size: .66rem; letter-spacing: .04em; } .navbar { gap: .7rem; } .navbar__cta { margin-left: 0; padding-left: 1rem; font-size: .82rem; } .navbar__cta .btn__arrow { width: 1.8rem; height: 1.8rem; } .nav__sub-toggle { width: 1.2rem; } }
