/* =============================================================
   uno.com.my — Layout: containers, sections, header, footer
   ============================================================= */

/* ---- Containers ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 880px; }

/* ---- Sections --------------------------------------------- */
.section { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }
.section--tight { padding-block: clamp(40px, 3vw + 20px, 64px); }
.section--flush-top { padding-top: 0; }

.section--soft   { background: var(--bg-soft); }
.section--fog    { background: var(--c-fog); }
.section--cream2 { background: var(--c-cream-2); }
.section--ink    { background: var(--c-black); color: var(--text-invert-soft); }
.section--navy   { background: var(--uno-navy); color: var(--text-invert-soft); }

.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4,
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 {
  color: var(--text-invert);
}

/* ---- Section heading block --------------------------------- */
.section-head { max-width: 660px; margin-bottom: var(--s-9); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { font-size: var(--fs-lead); }

.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-8);
  align-items: end;
  max-width: none;
}
@media (max-width: 860px) {
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--s-4);
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-slate);
}
.eyebrow--accent { color: var(--uno-yellow-600); }
.section--ink .eyebrow, .section--navy .eyebrow { color: var(--uno-yellow); }

/* ---- Generic grids ---------------------------------------- */
.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4, .grid--6 { grid-template-columns: 1fr; }
}

/* =============================================================
   Site header
   Structure: .nav > .nav__brand + ul.nav__menu > li.nav__item
              > .nav__row (link/button + caret) + .nav__panel
   Desktop opens panels on hover/focus; below --nav-break the whole
   menu becomes a drawer and panels collapse like an accordion.
   ============================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  padding-top: var(--s-5);
  transition: padding var(--t-base) var(--ease);
}
.site-header.is-stuck { padding-top: var(--s-3); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--header-h);
  padding: 0 var(--s-3) 0 var(--s-6);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(16,16,16,.06);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-nav);
}

.nav__brand { display: flex; align-items: center; margin-right: auto; }
.nav__brand img { height: 42px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 18px);
}
.nav__item { position: relative; display: flex; align-items: center; }
.nav__row  { display: flex; align-items: center; gap: 2px; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-graphite);
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 2px;
  background: var(--uno-yellow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-base) var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after,
.nav__link[data-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"],
.nav__link[data-current="true"] { color: var(--c-black); }

.nav__caret-icon {
  width: 9px; height: 9px;
  opacity: .5;
  transition: transform var(--t-base) var(--ease);
}
.nav__item:hover .nav__caret-icon,
.nav__link[aria-expanded="true"] .nav__caret-icon { transform: rotate(180deg); }

/* Caret button: only needed in the drawer, where the label is a real link. */
.nav__caret { display: none; }

.nav__link--quote { color: var(--c-black); font-weight: 700; }
.nav__link--quote svg { width: 16px; height: 16px; color: var(--uno-yellow-600); }

.nav__phone { flex-shrink: 0; gap: 8px; padding: 9px 15px; font-size: .78rem; }
.nav__phone svg { color: var(--uno-yellow-600); }

/* 21st-anniversary badge, sits between the menu and the phone button.
   Scales with the viewport so it never squeezes the menu on narrow desktops. */
.nav__anniversary {
  flex-shrink: 0;
  height: clamp(38px, 3.4vw, 52px);
  width: auto;
}

.nav__menu .nav__item--drawer-only { display: none; }

/* ---- Dropdown panels --------------------------------------- */
.nav__panel {
  position: absolute;
  top: 100%; left: 50%;
  z-index: var(--z-drawer);
  min-width: 272px;
  max-width: calc(100vw - var(--gutter) * 2);
  margin-top: 13px;
  padding: 10px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
}
/* Keeps hover alive while the pointer crosses the gap to the panel. */
.nav__panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -15px;
  height: 15px;
}
.nav__panel ul { display: grid; gap: 2px; }
.nav__panel--wide { min-width: 540px; }
.nav__panel--wide ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nav__panel a {
  display: block;
  padding: 9px 13px;
  border-radius: var(--r-xs);
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-slate);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav__panel a:hover { background: var(--c-cream); color: var(--c-black); }
.nav__panel a[aria-current="page"] { background: var(--uno-yellow-100); color: var(--c-black); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  position: relative;
  display: block;
  width: 20px; height: 2px;
  background: var(--c-black);
  transition: transform var(--t-base) var(--ease), background var(--t-fast) linear;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute; left: 0;
  width: 20px; height: 2px;
  background: var(--c-black);
  transition: transform var(--t-base) var(--ease), top var(--t-base) var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after  { top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ---- Desktop: hover / focus opens a panel -------------------- */
@media (min-width: 1201px) {
  .nav__panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity var(--t-fast) var(--ease),
                transform var(--t-base) var(--ease),
                visibility var(--t-base);
  }
  .nav__item:hover > .nav__panel,
  .nav__item:focus-within > .nav__panel,
  .nav__panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
  /* Panels near the right edge align to it instead of centring. */
  .nav__item:nth-child(n+4) > .nav__panel { left: auto; right: 0; transform: translate(0, -8px); }
  .nav__item:nth-child(n+4):hover > .nav__panel,
  .nav__item:nth-child(n+4):focus-within > .nav__panel,
  .nav__item:nth-child(n+4) > .nav__panel.is-open { transform: translate(0, 0); }
}

/* ---- Drawer ------------------------------------------------- */
@media (max-width: 1200px) {
  .nav { padding-left: var(--s-5); }

  .nav__menu {
    position: fixed;
    inset: calc(var(--header-h) + 34px) var(--gutter) auto var(--gutter);
    z-index: var(--z-drawer);
    display: block;
    max-height: calc(100vh - var(--header-h) - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--s-3) var(--s-4);
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility var(--t-base);
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__item {
    display: block;
    border-bottom: 1px solid var(--c-line);
  }
  .nav__item:last-child { border-bottom: 0; }
  .nav__row { justify-content: space-between; }

  .nav__link {
    flex: 1;
    padding: 14px 4px;
    font-size: 1rem;
  }
  .nav__link::after { display: none; }
  .nav__link--toggle { width: 100%; justify-content: space-between; }
  .nav__caret-icon { width: 11px; height: 11px; margin-right: 6px; }
  /* Link parents get a separate caret button in the drawer, so the inline
     chevron would be a duplicate. */
  a.nav__link .nav__caret-icon { display: none; }

  .nav__caret {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--c-slate);
  }
  .nav__caret svg { width: 11px; height: 11px; transition: transform var(--t-base) var(--ease); }
  .nav__caret[aria-expanded="true"] svg { transform: rotate(180deg); }

  /* Panels collapse in place instead of floating. */
  .nav__panel {
    position: static;
    display: grid;
    grid-template-rows: 0fr;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transition: grid-template-rows var(--t-base) var(--ease);
  }
  .nav__panel::before { display: none; }
  .nav__panel.is-open { grid-template-rows: 1fr; }
  .nav__panel > ul { overflow: hidden; grid-template-columns: 1fr; }
  .nav__panel--wide { min-width: 0; }
  .nav__panel--wide ul { grid-template-columns: 1fr; }
  .nav__panel a { padding: 11px 14px; font-size: .9rem; }
  .nav__panel li:last-child a { margin-bottom: var(--s-3); }

  .nav__menu .nav__item--drawer-only { display: block; padding-block: var(--s-4); }
  .nav__menu-cta { width: 100%; justify-content: center; }

  /* (0,2,0) so it beats `.btn`, which is imported after this file. */
  .nav .nav__phone { display: none; }
  .nav__toggle { display: flex; }

  /* The drawer takes the menu out of the flow; the brand's auto margin
     already pushes the badge and the toggle to the right. */
  .nav__anniversary { height: 42px; }
}

@media (max-width: 420px) {
  .nav__anniversary { height: 36px; }
}

/* Page offset for the fixed header */
.page-top { padding-top: calc(var(--header-h) + var(--s-8)); }

/* =============================================================
   Footer
   Mirrors the live site: light ground, a get-in-touch band over a
   photographic strip, the enquiry form beside the contact details,
   and a yellow legal bar.
   ============================================================= */
.site-footer {
  background: #202020;
  color: #bdbdbd;
  padding-top: 38px;
  font-size: 12px;
  line-height: 1.65;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1.05fr 1fr .8fr 1.2fr;
  gap: clamp(24px, 3vw, 48px);
  padding-bottom: 28px;
}
.footer-grid > * { min-width: 0; }
.footer-brand__logo { display: inline-block; margin-bottom: 14px; }
.footer-brand__logo img { width: 72px; height: auto; }
.footer-brand p { margin: 0 0 18px; max-width: 240px; font-size: 13px; }
.site-footer h2 { color: #f4f4f4; font-size: 12px; font-weight: 600; line-height: 1.5; margin: 0 0 14px; }
.footer-column ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.site-footer a { transition: color .18s ease; }
.site-footer a:hover { color: var(--uno-yellow); }
.site-footer a:focus-visible { outline: 2px solid var(--uno-yellow); outline-offset: 5px; border-radius: 2px; }
.footer-social { display: flex; gap: 9px; }
.footer-social a { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #777; border-radius: 50%; color: #ddd; }
.footer-social a:hover { border-color: var(--uno-yellow); }
.footer-social svg { width: 14px; height: 14px; }
.footer-office address { font-style: normal; margin-bottom: 5px; }
.footer-office__contact { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.footer-office__contact svg { width: 12px; height: 12px; flex: 0 0 12px; }
.footer-legal { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 13px; border-top: 1px solid #363636; color: #aaa; font-size: 10px; }
.footer-legal p { margin: 0; }
.footer-legal__links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-legal__links a + a { border-left: 1px solid #555; padding-left: 12px; }
@media (max-width: 1050px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-office { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer { padding-top: 32px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-office { grid-column: auto; }
  .footer-column ul { gap: 9px; }
  .footer-legal { align-items: flex-start; flex-direction: column; gap: 8px; padding-bottom: 24px; padding-right: 52px; }
}
/* ---- Floating WhatsApp button -------------------------------- */
.whatsapp-fab {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: var(--z-nav);
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 26px rgba(37,211,102,.42);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 34px rgba(37,211,102,.5); }
.whatsapp-fab svg { width: 30px; height: 30px; }
@media (max-width: 640px) { .whatsapp-fab { width: 50px; height: 50px; } .whatsapp-fab svg { width: 26px; height: 26px; } }
