/* ============================================================
   assets/css/theme.css
   Global Design Tokens — Ismano Portfolio
   Include this file on EVERY page before any other stylesheet.

   BRAND PALETTE
     #00A1F3  Sky Blue      — light accent, tints, glows, gradients
     #0759F8  Royal Blue    — PRIMARY (buttons, links, heroes, active)
     #EBA94E  Golden Orange — accent (eyebrow tick, highlights)
     #FFFFFF  White
     #000000  Black

   WHY royal blue is the primary and sky blue is the "light" accent:
   white text on #0759F8 passes WCAG AA; #0759F8 text on white also
   passes AA. Sky #00A1F3 fails contrast both ways, so it is used only
   for decorative tints/gradients — never as solid fills behind text.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand colours */
  --color-primary:        #0759F8;   /* royal blue — buttons, links, heroes, active */
  --color-primary-deep:   #0344C9;   /* darker royal — hover/pressed                */
  --color-primary-light:  #00A1F3;   /* sky blue — tints, glows, gradients          */
  --color-accent:         #EBA94E;   /* golden orange — highlights                  */
  --color-accent-dark:    #D4922F;   /* darker gold on hover                        */
  --color-secondary:      #081225;   /* deep blue-black — dark sections / footer    */
  --color-surface:        #FFFFFF;   /* card & section backgrounds                  */
  --color-surface-alt:    #F4F7FB;   /* subtle cool off-white sections              */
  --color-border:         #E4EAF2;   /* dividers, card borders                      */

  /* Text */
  --color-text-heading:   #0A1320;
  --color-text-body:      #3D4756;
  --color-text-muted:     #7C8696;
  --color-text-inverse:   #FFFFFF;

  /* ---- Aliases used by the navbar/footer & layout-rendered pages.
          Kept identical to the tokens above so BOTH naming schemes
          (--color-* and --brand-*) resolve to the same palette. ---- */
  --brand-primary:        #0759F8;
  --brand-secondary:      #00A1F3;
  --brand-accent:         #EBA94E;
  --brand-white:          #FFFFFF;
  --brand-black:          #000000;

  /* Typography */
  --font-display:         'EB Garamond', Georgia, serif;     /* headings, brand */
  --font-body:            'Poppins', system-ui, sans-serif;  /* body copy       */

  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-md:    1.125rem;   /* 18px */
  --text-lg:    1.375rem;   /* 22px */
  --text-xl:    1.75rem;    /* 28px */
  --text-2xl:   2.25rem;    /* 36px */
  --text-3xl:   3rem;       /* 48px */
  --text-4xl:   4rem;       /* 64px */

  /* 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;

  /* Shape */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows (faint blue-black cast for cohesion) */
  --shadow-sm:  0 1px 3px rgba(10,19,32,0.07), 0 1px 2px rgba(10,19,32,0.05);
  --shadow-md:  0 4px 16px rgba(10,19,32,0.09);
  --shadow-lg:  0 12px 40px rgba(10,19,32,0.11);
  --shadow-xl:  0 24px 60px rgba(10,19,32,0.13);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max: 1240px;
  --section-pad-y: var(--space-24);
  --navbar-height: 72px;
}

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-body);
  background-color: var(--color-surface);
  line-height: 1.65;
}

/* ── Typography helpers ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-xl);  font-weight: 700; }
h4 { font-size: var(--text-lg);  font-weight: 600; }

p { line-height: 1.75; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Inline text link inside body copy — readable royal, gold underline on hover */
.link {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(7,89,248,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}
.link:hover { color: var(--color-primary-deep); text-decoration-color: var(--color-accent); }

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--section-pad-y);
}

.section--alt {
  background-color: var(--color-surface-alt);
}

.section--dark {
  background-color: var(--color-secondary);
  color: var(--color-text-inverse);
}

/* ── Section label (eyebrow text) ────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);   /* gold tick */
  flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.625rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

/* Primary = royal blue (contrast-safe), gold sits as the accent elsewhere */
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-deep);
  border-color: var(--color-primary-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(7,89,248,0.28);
}

/* Optional warm CTA when you want the gold to lead (e.g. a single hero CTA) */
.btn--accent {
  background: var(--color-accent);
  color: var(--color-secondary);
  border-color: var(--color-accent);
}
.btn--accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--dark {
  background: var(--color-secondary);
  color: var(--color-text-inverse);
  border-color: var(--color-secondary);
}
.btn--dark:hover {
  background: #0F1E3A;
  border-color: #0F1E3A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn--outline-inv {
  background: transparent;
  color: var(--color-text-inverse);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline-inv:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.btn svg, .btn i { font-size: 0.85em; transition: transform var(--transition-fast); }
.btn:hover svg, .btn:hover i { transform: translateX(3px); }

/* ── Utility classes ──────────────────────────────────────── */
.text-muted   { color: var(--color-text-muted); }
.text-accent  { color: var(--color-primary); }       /* readable blue on light bg */
.text-gold    { color: var(--color-accent); }         /* only on dark backgrounds  */
.text-center  { text-align: center; }

.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.mt-auto { margin-top: auto; }

/* ── Tag / badge ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag--accent { background: var(--color-accent); color: var(--color-secondary); }
.tag--muted  { background: var(--color-surface-alt); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.tag--dark   { background: var(--color-secondary); color: #fff; }
.tag--blue   { background: rgba(7,89,248,0.10); color: var(--color-primary); }

/* ── Card base ────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-8);
}

/* ── Scroll reveal animation (JS triggers .is-visible) ───── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Accessible focus ring (brand gold) ───────────────────── */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Responsive breakpoints ───────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad-y: var(--space-16); }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

@media (max-width: 768px) {
  :root {
    --section-pad-y: var(--space-12);
    --container-max: 100%;
  }
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }
}

@media (max-width: 480px) {
  :root { --section-pad-y: var(--space-10); }
  .container { padding-inline: var(--space-4); }
}

/* In assets/css/theme.css — add at the bottom */
body.has-solid-nav {
    padding-top: var(--navbar-height, 80px);
}
