/* ───────────────────────── BugaBuild · Siding Solutions ───────────────────────── */
:root {
  --navy: #0E212F;
  --navy-700: #16293a;
  --gold: #B08D4F;
  --gold-light: #C9A35E;
  --cream: #F7F5F1;
  --card: #FFFFFF;
  --text: #0E212F;
  --muted: #5d6973;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(14, 33, 47, 0.07);
  --shadow-hover: 0 12px 28px rgba(14, 33, 47, 0.14);
  --font: "Poppins", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Visually hidden, still exposed to assistive tech. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The page column — full-bleed on phones, a floating card on larger screens.
   Locked to the viewport height so the page never scrolls; the mascot panel
   flexes to fill leftover space and the bear is cropped at the footer. */
.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 540px;          /* stays full-bleed on phones; the card kicks in at >=540 */
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

/* ───────────────────────── Header ───────────────────────── */
.header {
  padding: clamp(16px, 3.6vh, 38px) 26px clamp(2px, 0.6vh, 8px);
  text-align: center;
}

.logo {
  display: block;
  width: min(72%, 288px);
  max-height: clamp(120px, 22vh, 188px);   /* shrink on short screens to free room for the bear */
  height: auto;
  margin: 0 auto;
}

.tagline {
  margin: clamp(8px, 1.6vh, 16px) 0 0;
  font-weight: 500;
  font-size: clamp(15px, 4.2vw, 18px);
  letter-spacing: 0.2px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}

/* Each word travels with its leading diamond, so a separator can never strand a line end. */
.tagline .t-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.tagline .sep {
  color: var(--gold);
  font-size: 0.72em;
  transform: translateY(-1px);
}

/* ───────────────────────── Link cards ───────────────────────── */
.links {
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.6vh, 14px);
  padding: clamp(14px, 2.4vh, 24px) 22px clamp(4px, 1vh, 8px);
}

.link-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: clamp(10px, 1.5vh, 14px) 18px clamp(10px, 1.5vh, 14px) 14px;
  background: var(--card);
  border: 1px solid rgba(14, 33, 47, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.link-icon {
  flex: 0 0 auto;
  width: clamp(40px, 5.6vh, 44px);
  height: clamp(40px, 5.6vh, 44px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.link-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.link-label {
  flex: 1 1 auto;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.1px;
}

.chevron {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--gold);
  transition: transform .18s ease;
}

/* Pointer devices get hover lift; touch devices get a press state. */
@media (hover: hover) {
  .link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(176, 141, 79, 0.55);
  }
  .link-card:hover .chevron { transform: translateX(3px); }
}

.link-card:active { transform: translateY(0) scale(.99); }

.link-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ───────────────────────── Mascot / hero ─────────────────────────
   The navy panel is positioned behind the bear (absolute). The bear is a
   normal-flow sibling, so it defines the section height AND its head/cap is
   free to rise into the cream above the panel's curved top edge. */
.hero {
  flex: 1 1 auto;            /* fills whatever height is left under the cards */
  min-height: 0;
  position: relative;
  margin-top: clamp(6px, 1.4vh, 18px);
  background: var(--cream);
  overflow: hidden;          /* crops the bear's legs at the footer + honours card radius */
  isolation: isolate;
}

.hero-defs { position: absolute; width: 0; height: 0; }

.hero-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background: radial-gradient(130% 120% at 24% 100%, var(--navy-700) 0%, var(--navy) 60%);
  -webkit-clip-path: url(#heroTop);
  clip-path: url(#heroTop);
  z-index: 0;
}

/* Same box as the panel so the stroke rides just above the navy clip edge. */
.hero-curve {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 62%;
  z-index: 1;
  opacity: 0.95;
  pointer-events: none;
}
.hero-curve path { vector-effect: non-scaling-stroke; }

/* Taller than the hero and anchored to the top, so the cap stays in the cream
   while the legs run past the footer line and get cropped — as in the reference. */
.bear {
  position: absolute;
  top: 0;
  right: 3%;
  z-index: 2;
  height: 166%;
  width: auto;
  max-width: 92%;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.32));
}

/* ───────────────────────── Desktop: float the card ───────────────────────── */
@media (min-width: 540px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background:
      radial-gradient(80% 55% at 50% 0%, #fefdfb 0%, var(--cream) 55%, #efe9df 100%);
  }
  .shell {
    height: min(880px, calc(100dvh - 56px));   /* fits the viewport, still no scroll */
    max-width: 480px;
    margin: 0;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(14, 33, 47, 0.20);
    border: 1px solid rgba(14, 33, 47, 0.06);
  }
  .header { padding-top: clamp(28px, 3.6vh, 46px); }
}

/* Short viewports (landscape phones, tiny windows): the single-screen lock would
   clip content, so fall back to a normal scrollable full-bleed layout. */
@media (max-height: 560px) {
  body { display: block; min-height: 0; }
  .shell {
    height: auto;
    min-height: 100dvh;
    max-width: 540px;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    border: 0;
  }
  .hero { flex: 0 0 auto; height: 300px; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
