/* ============================================================================
   MSimons Portal — landing index
   Design language inspired by dl-brand-guidelines (Derwent Central design system)
   ============================================================================ */

/* ── Fonts — The Future, full weight set (mirrors dl-brand-guidelines) ── */
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-thin.woff2') format('woff2'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-thin-italic.woff2') format('woff2'); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-extralight.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-extralight-italic.woff2') format('woff2'); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-light-italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-medium-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-bold-italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'The Future'; src: url('assets/fonts/the-future-black-italic.woff2') format('woff2'); font-weight: 900; font-style: italic; font-display: swap; }

/* ── Tokens ──
   Palette: dark holly green with yellow accents */
:root {
  --holly-deep:      #06201a;   /* page background — near-black with green tint */
  --holly:           #0c3a2a;   /* hero — dark holly green */
  --holly-mid:       #11483a;   /* slightly raised holly */
  --holly-leaf:      #1f5a48;   /* card borders on hover */

  --yellow:          #f4c430;   /* primary accent */
  --yellow-warm:     #ffd23f;   /* highlight */
  --yellow-deep:     #c89a14;   /* pressed / hover for yellow surfaces */

  --white:           #ffffff;
  --cream:           #f3f1e7;
  --warm-grey:       #c8ccc6;
  --mid-grey:        #6f7672;

  --surface-base:        var(--holly-deep);
  --surface-elevated:    #102b22;
  --hero-bg:             var(--holly);
  --border-subtle:       #163a2c;
  --border-strong:       #1f5a48;

  --text-primary:        var(--cream);
  --text-secondary:      var(--warm-grey);
  --text-tertiary:       #7a857f;
  --hero-eyebrow:        rgba(255,255,255,0.4);
  --chrome-bg:           rgba(255,255,255,0.06);
  --chrome-bg-hover:     rgba(244,196,48,0.12);
  --chrome-border:       rgba(255,255,255,0.12);

  /* Typography */
  --font-primary: 'The Future', 'Century Gothic', 'Futura', -apple-system, system-ui, sans-serif;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --tracking-wide:   0.02em;
  --tracking-wider:  0.04em;
  --tracking-widest: 0.08em;

  --leading-relaxed: 1.65;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
}

/* ── Light mode (colour overrides only) ── */
[data-theme="light"] {
  --surface-base:        #f6f3e7;          /* warm cream */
  --surface-elevated:    #ffffff;
  --hero-bg:             var(--holly);     /* keep hero dark for contrast */
  --border-subtle:       #e6e1d0;
  --border-strong:       #c8c2a8;

  --text-primary:        #0a1f17;
  --text-secondary:      #3a4a40;
  --text-tertiary:       #6f7672;
  /* Chrome buttons stay dark in both themes so they read on cream and on hero */
  --chrome-bg:           rgba(12, 58, 42, 0.78);
  --chrome-bg-hover:     rgba(12, 58, 42, 0.92);
  --chrome-border:       rgba(255, 255, 255, 0.18);
}

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

html {
  background: var(--hero-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--weight-light);
  font-size: var(--text-base);
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  background-color: var(--surface-base);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 96px 32px 64px;
  background: var(--hero-bg);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.25) 0%, transparent 60%);
  pointer-events: none;
}

.hero__logo {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.hero__logo dotlottie-wc {
  width: 200px;
  height: 200px;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: var(--text-4xl);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-wide);
  color: var(--white);
  text-align: center;
  margin-bottom: 12px;
}

.hero__subtitle {
  position: relative;
  z-index: 1;
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  color: var(--white);
  text-align: center;
  max-width: 520px;
  line-height: var(--leading-relaxed);
  min-height: calc(var(--text-md) * var(--leading-relaxed) * 2);
  display: flex;
  align-items: center;
}

.hero__eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* ── Chrome (fixed back button + theme toggle) ── */
.chrome-btn {
  position: fixed;
  top: 16px;
  z-index: 200;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chrome-btn:hover {
  background: var(--chrome-bg-hover);
  border-color: var(--yellow);
  color: var(--white);
}

.back-btn { left: 16px; }
.theme-btn { right: 16px; padding: 0; width: 40px; justify-content: center; }
.theme-btn svg { width: 16px; height: 16px; }

[data-theme="light"] .chrome-btn {
  color: var(--white);
}
[data-theme="light"] .chrome-btn:hover {
  color: var(--white);
  background: var(--chrome-bg-hover);
  border-color: var(--yellow);
}

/* ── Navigation grid ── */
.nav-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.nav-grid--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
}

@media (max-width: 900px) {
  .nav-grid,
  .nav-grid--two { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav-grid,
  .nav-grid--two { grid-template-columns: 1fr; }
}

.nav-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  min-height: 220px;
}

.nav-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.nav-card__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--yellow);
  flex-shrink: 0;
  background: var(--holly-mid);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 10px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-card__icon svg,
.nav-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inline SVG icons (index/derwent) need padding so they don't fill edge-to-edge */
.nav-card__icon > svg {
  padding: 14px;
}

[data-theme="light"] .nav-card__icon {
  background: #f3eedb;
  color: var(--holly);
  box-shadow:
    0 1px 2px rgba(10, 31, 23, 0.12),
    0 10px 20px rgba(10, 31, 23, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.nav-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wide);
  margin-bottom: 8px;
  color: var(--text-primary);
}

.nav-card__desc {
  font-size: var(--text-sm);
  font-weight: var(--weight-light);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  flex: 1;
}

.nav-card__meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ── Footer ── */
.pack-footer {
  margin-top: auto;
  padding: 32px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-light);
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.pack-footer a {
  color: var(--white);
  transition: color 0.15s;
}

.pack-footer a:hover {
  color: var(--yellow);
}
