/* ============================================================
   MAIN.CSS — Imperio Flooring INC.
   Tokens · Reset · Typography · Layout · Utilities
   ============================================================ */

/* ===== GOOGLE FONTS loaded via <link> in HTML ===== */

/* ===== DESIGN TOKENS ===== */
:root {
  /* — Primitive Colors — */
  --black:        #0d0d0d;
  --dark:         #1a1a1a;
  --dark-mid:     #252525;
  --dark-card:    #2a2a2a;
  --gold:         #D4AF37;
  --gold-light:   #E8C84A;
  --gold-dim:     rgba(212, 175, 55, 0.12);
  --gold-border:  rgba(212, 175, 55, 0.22);
  --terra:        #C4622D;
  --white:        #FFFFFF;
  --off-white:    #F7F5F2;
  --gray-100:     #F0EDE8;
  --gray-200:     #E0DDD8;
  --gray-500:     #8A8480;
  --gray-700:     #4A4744;
  --whatsapp:     #25D366;

  /* — Semantic aliases & extra tokens — */
  --card-dark:   #2a2a2a;               /* alias for --dark-card */
  --card-darker: #1e1e1e;               /* between --dark and --dark-card */
  --gray-300:    #C8C4BF;
  --gray-400:    #9A9690;
  --border-card: rgba(255, 255, 255, 0.08);
  --dur-base:    200ms;

  /* — Typography — */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* — Type Scale — */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* — Spacing (8pt grid) — */
  --sp-1:  0.5rem;
  --sp-2:  1rem;
  --sp-3:  1.5rem;
  --sp-4:  2rem;
  --sp-5:  2.5rem;
  --sp-6:  3rem;
  --sp-8:  4rem;
  --sp-10: 5rem;
  --sp-12: 6rem;
  --sp-16: 8rem;

  /* — Radius — */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* — Shadows — */
  --shadow-gold:  0 4px 24px rgba(212, 175, 55, 0.20);
  --shadow-card:  0 2px 16px rgba(0, 0, 0, 0.40);
  --shadow-heavy: 0 8px 40px rgba(0, 0, 0, 0.60);

  /* — Transitions — */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:   150ms;
  --dur-normal: 250ms;
  --dur-slow:   400ms;

  /* — Z-Index — */
  --z-card:    10;
  --z-header:  100;
  --z-menu:    200;
  --z-float:   300;
  --z-overlay: 400;

  /* — Layout — */
  --container-max: 1280px;
  --container-pad: var(--sp-3);
  --header-h:      80px;
}

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

[hidden] { display: none !important; }

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--white);
  background-color: var(--dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--white);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.70);
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

section {
  padding-block: var(--sp-12);
}

/* ===== SECTION VARIANTS ===== */

/* Dark (default) — base body bg */
.section-dark {
  background-color: var(--dark);
}

/* Darker — slightly deeper bg for visual rhythm */
.section-darker {
  background-color: var(--black);
}

/* Mid — card-level dark for alternating sections */
.section-mid {
  background-color: var(--dark-mid);
}

/* Light — off-white sections for contrast */
.section-light {
  background-color: var(--off-white);
}
.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
  color: var(--dark);
}
.section-light p {
  color: var(--gray-700);
}
.section-light .section-badge {
  color: var(--terra);
  border-color: rgba(196, 98, 45, 0.35);
}
.section-light .gold-line {
  background: var(--terra);
}

/* ===== SECTION BADGE ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: var(--sp-2);
}

/* ===== SECTION HEADER ===== */
.section-header {
  max-width: 640px;
  margin-bottom: var(--sp-8);
}

.section-header.centered {
  text-align: center;
  margin-inline: auto;
}

.section-header h2 {
  margin-bottom: var(--sp-2);
}

.section-header p {
  font-size: var(--text-lg);
}

/* ===== GOLD ACCENT LINE ===== */
.gold-line {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: var(--sp-2) 0;
}

.section-header.centered .gold-line {
  margin-inline: auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background-color var(--dur-normal) var(--ease-out),
    color           var(--dur-normal) var(--ease-out),
    border-color    var(--dur-normal) var(--ease-out),
    transform       var(--dur-fast)   var(--ease-out),
    box-shadow      var(--dur-normal) var(--ease-out);
  white-space: nowrap;
  min-height: 52px; /* touch target */
}

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

/* Primary — gold fill */
.btn-primary {
  background-color: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

.btn-primary:hover {
  background-color: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary — ghost / outline */
.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.40);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* Secondary on light backgrounds */
.section-light .btn-secondary {
  color: var(--dark);
  border-color: rgba(26, 26, 26, 0.35);
}

.section-light .btn-secondary:hover {
  border-color: var(--terra);
  color: var(--terra);
}

/* ===== GRID UTILITIES ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

/* ===== UTILITIES ===== */
.text-gold   { color: var(--gold); }
.text-terra  { color: var(--terra); }
.text-center { text-align: center; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.mt-2  { margin-top: var(--sp-2); }
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-4  { margin-bottom: var(--sp-4); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
  section { padding-block: var(--sp-8); }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  :root { --container-pad: var(--sp-2); }
}
