/* ═══════════════════════════════════════════════════════════════
   LIVERA — Luxury Aluminium Facade Systems
   Design Tokens + Full Site Styles
═══════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface-2:   #161616;
  --gold:        #C9A84C;
  --gold-light:  #E8D5A3;
  --gold-dim:    #8a6f2e;
  --white:       #F5F5F5;
  --grey:        #888888;
  --grey-light:  #aaaaaa;
  --border:      rgba(201,168,76,0.18);

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden; /* locked until loader done */
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════════════════════ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  overflow: hidden;
  transition: opacity 0.9s var(--ease-out-expo), visibility 0.9s;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── 3-Column Strip Grid ─────────────────────────────────────── */
#strips-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  background: #040404; /* gap colour — hairline separators */
  z-index: 1;
}

.loader-strip {
  overflow: hidden;
  position: relative;
}

.loader-strip__track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.loader-strip__track img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  filter: brightness(0.72) saturate(0.62);
  transition: filter 0.4s ease;
}

/* ── Edge Vignettes (top / bottom) ──────────────────────────── */
.loader-vignette {
  position: absolute;
  left: 0; right: 0;
  height: 180px;
  pointer-events: none;
  z-index: 4;
}

.loader-vignette--top {
  top: 0;
  background: linear-gradient(to bottom, rgba(4,4,4,0.92) 0%, transparent 100%);
}

.loader-vignette--bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(4,4,4,0.92) 0%, transparent 100%);
}

/* ── Logo Halo — soft dark radial, not a box ─────────────────── */
#loader-logo-halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse 52% 62% at 50% 50%,
    rgba(4, 4, 4, 0.86) 0%,
    rgba(4, 4, 4, 0.58) 30%,
    rgba(4, 4, 4, 0.18) 60%,
    transparent 100%
  );
}

/* ── Cursor Glow — follows mouse via CSS vars ────────────────── */
#loader-cursor-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(
    420px circle at var(--gx, -999px) var(--gy, -999px),
    rgba(201, 168, 76, 0.09) 0%,
    rgba(201, 168, 76, 0.03) 50%,
    transparent 100%
  );
  transition: background 0.05s linear;
}

/* ── Loader Center (Logo) ────────────────────────────────────── */
#loader-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

#loader-logo {
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
}

#loader-logo.visible {
  opacity: 1;
}

#loader-logo img {
  width: 200px;
  max-width: 30vw;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 28px rgba(235, 240, 245, 0.28))
          drop-shadow(0 0 60px rgba(210, 220, 230, 0.1));
}

/* ── Progress Bar ────────────────────────────────────────────── */
#progress-wrap {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 70vw);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#progress-bar {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  position: relative;
  overflow: hidden;
}

#progress-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--pct, 0%);
  background: rgba(220, 228, 235, 0.8);
  transition: width 0.15s linear;
}

#progress-pct {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   SITE (hidden until loader done)
═══════════════════════════════════════════════════════════════ */

#site {
  opacity: 0;
  transition: opacity 0.6s ease;
}

#site.visible {
  opacity: 1;
}

#site.hidden {
  visibility: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════════ */

#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 72px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 0%, transparent 100%);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

#nav.scrolled {
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo svg {
  width: 130px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-light);
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED UTILITIES
═══════════════════════════════════════════════════════════════ */

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 20px;
}

.section-title em,
.about-title em,
.hero-title em,
.contact-title em {
  font-style: italic;
  color: var(--gold);
}

.section-desc {
  font-size: 15px;
  color: var(--grey-light);
  max-width: 500px;
  line-height: 1.7;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.25);
}

.btn-gold.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-outline-sm {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-outline-sm:hover {
  background: var(--gold);
  color: var(--bg);
}

/* scroll-reveal base */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */

#hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: url('assets/shingles/4.jpg');
  transform: scale(1.08);
  transition: transform 0.1s linear;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10,10,10,0.92) 0%,
    rgba(10,10,10,0.7) 50%,
    rgba(10,10,10,0.4) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 110px);
  font-weight: 300;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 0;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 28px;
}

.hero-body {
  font-size: 14px;
  color: var(--grey-light);
  line-height: 1.8;
  margin-bottom: 44px;
  max-width: 440px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 80px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
}

.scroll-line {
  width: 50px;
  height: 1px;
  background: var(--gold-dim);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCTS / COLLECTIONS
═══════════════════════════════════════════════════════════════ */

#products {
  padding: 120px 80px;
  background: var(--bg);
}

.section-header {
  margin-bottom: 64px;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

/* make last 2 cards span differently for visual balance */
.collection-card:nth-child(4) {
  grid-column: 1 / span 1;
}
.collection-card:nth-child(5) {
  grid-column: 2 / span 2;
}

.collection-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.collection-card:nth-child(5) .card-img-wrap {
  aspect-ratio: 16/9;
}

.card-img-wrap img {
  transition: transform 0.7s var(--ease-out-expo), filter 0.4s ease;
  filter: brightness(0.75) saturate(0.7);
}

.collection-card:hover .card-img-wrap img {
  transform: scale(1.06);
  filter: brightness(0.55) saturate(0.5);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.collection-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay p {
  font-size: 13px;
  color: var(--grey-light);
  line-height: 1.7;
  margin-bottom: 18px;
}

.card-info {
  padding: 18px 0 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card-info h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
}

.card-tag {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════ */

#about {
  padding: 120px 80px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-gold-line {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 28px;
}

.about-title {
  font-family: var(--font-serif);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 28px;
}

.about-body {
  font-size: 14px;
  color: var(--grey-light);
  line-height: 1.85;
  margin-bottom: 18px;
}

.about-stats {
  display: flex;
  gap: 44px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.75);
}

.about-image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 60%;
  height: 60%;
  border: 1px solid var(--gold-dim);
  z-index: -1;
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */

#contact {
  padding: 120px 80px;
  background: var(--bg);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}

.contact-body {
  font-size: 14px;
  color: var(--grey-light);
  line-height: 1.85;
  margin-bottom: 48px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--gold-dim);
}

.detail-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.detail-value {
  font-size: 14px;
  color: var(--grey-light);
}

/* ── Form ─────────────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--grey);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--white);
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  resize: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.1);
}

.form-note {
  font-size: 11px;
  color: var(--grey);
  text-align: center;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */

#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 80px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo svg {
  width: 110px;
}

.footer-logo p {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 6px;
}

.footer-nav {
  display: flex;
  gap: 32px;
}

.footer-nav a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .collection-card:nth-child(4),
  .collection-card:nth-child(5) {
    grid-column: auto;
  }
  .collection-card:nth-child(5) .card-img-wrap {
    aspect-ratio: 4/3;
  }
  .about-inner {
    grid-template-columns: 1fr;
  }
  .about-image {
    order: -1;
  }
  .about-image img {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  #nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  #hero { padding: 0; }
  .hero-content { padding: 0 24px; }
  .hero-scroll-hint { left: 24px; }

  #products,
  #about,
  #contact,
  #footer { padding: 80px 24px; }

  .collections-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-stats {
    gap: 28px;
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
