/* ============================================================
   BRIXYN LTD — Design System
   Aesthetic: Warm Industrial Luxury
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Colours */
  --col-charcoal:     #1C1C1E;
  --col-charcoal-2:   #252523;
  --col-stone:        #2E2B28;
  --col-stone-light:  #3D3A36;
  --col-copper:       #C8783A;
  --col-copper-light: #E09050;
  --col-copper-dim:   #8A4E22;
  --col-cream:        #F5F0EB;
  --col-cream-dim:    #DDD8D2;
  --col-white:        #FFFFFF;
  --col-error:        #D94F4F;
  --col-success:      #4CAF77;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Fluid type scale */
  --text-xs:   clamp(0.70rem, 1.5vw, 0.75rem);
  --text-sm:   clamp(0.85rem, 1.8vw, 0.9rem);
  --text-base: clamp(0.95rem, 2vw,   1rem);
  --text-md:   clamp(1.05rem, 2.2vw, 1.125rem);
  --text-lg:   clamp(1.2rem,  2.5vw, 1.35rem);
  --text-xl:   clamp(1.4rem,  3vw,   1.75rem);
  --text-2xl:  clamp(1.8rem,  4vw,   2.5rem);
  --text-3xl:  clamp(2.2rem,  5vw,   3.5rem);
  --text-hero: clamp(2.8rem,  7vw,   5.5rem);

  /* Spacing (8px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --max-w:       1320px;
  --max-w-prose: 72ch;
  --nav-h:       72px;

  /* Border */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.55);
  --shadow-copper: 0 0 0 1px var(--col-copper);

  /* Transitions */
  --ease-smooth:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:   150ms;
  --t-base:   280ms;
  --t-slow:   480ms;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--col-cream);
  background-color: var(--col-charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-4), 5vw, var(--sp-12));
}

.section {
  padding-block: clamp(var(--sp-12), 8vw, var(--sp-32));
}

.section--sm {
  padding-block: clamp(var(--sp-8), 5vw, var(--sp-16));
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

.text-copper   { color: var(--col-copper); }
.text-cream    { color: var(--col-cream); }
.text-dim      { color: var(--col-cream-dim); }
.text-sm       { font-size: var(--text-sm); }
.text-xs       { font-size: var(--text-xs); }
.text-upper    { text-transform: uppercase; letter-spacing: 0.15em; font-size: var(--text-xs); font-weight: 600; }
.text-center   { text-align: center; }

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--col-copper);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--col-cream);
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--col-cream-dim);
  max-width: 58ch;
}

/* ── Dividers & Decorative ─────────────────────────────────── */
.copper-line {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--col-copper);
  margin-bottom: var(--sp-6);
}

.copper-line--center { margin-inline: auto; margin-bottom: var(--sp-6); }

/* ── Focus / Accessibility ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--col-copper);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Scroll bar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--col-charcoal); }
::-webkit-scrollbar-thumb { background: var(--col-stone-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--col-copper); }

/* ── Responsive Breakpoints ────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── Visually Hidden (a11y) ────────────────────────────────── */
.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;
}

/* ── Notification Toast ────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  background: var(--col-stone);
  color: var(--col-cream);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--col-copper);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform var(--t-base) var(--ease-smooth),
              opacity  var(--t-base) var(--ease-smooth);
  max-width: 320px;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}
