/* ========================================
   AJ Nova Hub — Main Stylesheet
   1. Design Tokens
   2. Reset
   3. Base Elements
   4. Layout System
   5. Responsive Overrides
   ======================================== */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Color Palette — Deep Green + Soft Gold */
  --color-primary:          #0F4C2F;
  --color-primary-light:    #156F3F;
  --color-primary-dark:     #0A3320;
  --color-primary-rgb:      15, 76, 47;

  --color-accent:           #C9A84C;
  --color-accent-light:     #D4B96A;
  --color-accent-dark:      #A88D35;
  --color-accent-rgb:       201, 168, 76;

  --color-charcoal:         #3A3A3A;
  --color-charcoal-light:   #5A5A5A;
  --color-charcoal-dark:    #2A2A2A;

  --color-grey-light:       #F5F5F5;
  --color-grey-pale:        #F8F9FA;
  --color-grey-border:      #E5E7EB;

  --color-white:            #FFFFFF;
  --color-off-white:        #FAFAFA;
  --color-black:            #111111;

  --color-success:          #10B981;
  --color-error:            #EF4444;
  --color-warning:          #F59E0B;

  /* Green tints for backgrounds */
  --color-green-soft:       #EDF5F0;
  --color-green-pale:       #F5FAF7;

  /* Typography */
  --font-heading:           'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:              'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --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;

  --leading-tight:          1.15;
  --leading-snug:           1.3;
  --leading-normal:         1.6;
  --leading-relaxed:        1.75;

  --tracking-tight:         -0.02em;
  --tracking-normal:        0;
  --tracking-wide:          0.04em;
  --tracking-wider:         0.08em;

  /* Spacing Scale */
  --space-1:                0.25rem;
  --space-2:                0.5rem;
  --space-3:                0.75rem;
  --space-4:                1rem;
  --space-5:                1.25rem;
  --space-6:                1.5rem;
  --space-8:                2rem;
  --space-10:               2.5rem;
  --space-12:               3rem;
  --space-16:               4rem;
  --space-20:               5rem;
  --space-24:               6rem;
  --space-32:               8rem;

  /* Container */
  --container-max:          1200px;
  --container-narrow:       900px;
  --container-wide:         1400px;
  --container-padding:      1.5rem;

  /* Border Radius */
  --radius-none:            0;
  --radius-sm:              4px;
  --radius-md:              8px;
  --radius-lg:              12px;
  --radius-xl:              16px;
  --radius-2xl:             24px;
  --radius-full:            9999px;

  /* Shadows */
  --shadow-sm:              0 1px 2px rgba(var(--color-primary-rgb), 0.05);
  --shadow-md:              0 4px 6px -1px rgba(var(--color-primary-rgb), 0.08), 0 2px 4px -2px rgba(var(--color-primary-rgb), 0.05);
  --shadow-lg:              0 10px 15px -3px rgba(var(--color-primary-rgb), 0.1), 0 4px 6px -4px rgba(var(--color-primary-rgb), 0.05);
  --shadow-xl:              0 20px 25px -5px rgba(var(--color-primary-rgb), 0.12), 0 8px 10px -6px rgba(var(--color-primary-rgb), 0.06);
  --shadow-2xl:             0 40px 50px -12px rgba(var(--color-primary-rgb), 0.25);
  --shadow-accent:          0 4px 14px rgba(var(--color-accent-rgb), 0.35);

  /* Transitions */
  --transition-fast:        150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:        300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:        500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Layers */
  --z-header:               100;
  --z-mobile-nav:           200;
  --z-overlay:              250;
  --z-modal:                300;
  --z-toast:                400;
  --z-whatsapp:             350;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-primary);
  overflow-wrap: break-word;
}

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

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* ── 3. BASE ELEMENTS ──────────────────────────────────────────── */

/* Skip to content — accessibility */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-accent);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}
.skip-to-content:focus {
  top: var(--space-2);
}

/* Selection */
::selection {
  background: rgba(var(--color-accent-rgb), 0.3);
  color: var(--color-primary-dark);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Links in body text */
main a:not([class]) {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
main a:not([class]):hover {
  color: var(--color-accent-dark);
}

/* ── 4. LAYOUT SYSTEM ──────────────────────────────────────────── */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Sections */
.section {
  padding-block: var(--space-24);
}

.section--tight {
  padding-block: var(--space-12);
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-white);
}

.section--light {
  background-color: var(--color-grey-light);
}

.section--pale {
  background-color: var(--color-green-pale);
}

.section--green-soft {
  background-color: var(--color-green-soft);
}

.section--accent-bg {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
}

.section--accent-bg h1,
.section--accent-bg h2,
.section--accent-bg h3,
.section--accent-bg h4 {
  color: var(--color-white);
}

/* Section Header */
.section__header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section__label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-6);
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.section--dark .section__title,
.section--accent-bg .section__title {
  color: var(--color-white);
}

.section--dark .section__title::after,
.section--accent-bg .section__title::after {
  background: var(--color-accent);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-charcoal-light);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin-inline: auto;
}

.section--dark .section__subtitle,
.section--accent-bg .section__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--space-8);
}

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

/* Split layout (text + image side by side) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.split--reversed {
  direction: rtl;
}
.split--reversed > * {
  direction: ltr;
}

.split__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.split__content h2 {
  margin-bottom: var(--space-6);
}

.split__content p {
  font-size: var(--text-lg);
  color: var(--color-charcoal-light);
  line-height: var(--leading-relaxed);
}

/* ── 5. RESPONSIVE ─────────────────────────────────────────────── */

/* lg: 1024px — tablets landscape, small desktops */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.25rem;
  }

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

  .section { padding-block: var(--space-16); }
  .section__title { font-size: var(--text-3xl); }
  .section__header { margin-bottom: var(--space-12); }

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

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .split__content {
    order: 1;
  }
  .split__image {
    order: 2;
  }
}

/* md: 768px — tablets portrait */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  .section { padding-block: var(--space-12); }
  .section__title { font-size: var(--text-2xl); }
  .section__header { margin-bottom: var(--space-10); }
  .section__subtitle { font-size: var(--text-base); }

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

  .split__content p {
    font-size: var(--text-base);
  }
}

/* sm: 640px — large phones */
@media (max-width: 640px) {
  h1 { font-size: var(--text-2xl); }

  .section { padding-block: var(--space-10); }
  .section__title { font-size: var(--text-2xl); padding-bottom: var(--space-4); }
  .section__label { font-size: var(--text-xs); }
}
