/* =============================================================
   STYLES.CSS — Digital Atelier Landing Page
   =============================================================
   Organised as:
     1. Reset & Base
     2. Design Tokens (colours, spacing, radius, shadows, type)
     3. Utilities (reusable typographic & layout helpers)
     4. Components (nav, buttons, cards, perspective-grid)
     5. Sections  (hero, apps, philosophy, cta, footer)
     6. Responsive (tablet ≤1024 → mobile ≤640)
   ============================================================= */


/* 1. RESET & BASE
   ============================================================= */

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

html  { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  color: var(--on-surface);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img    { display: block; max-width: 100%; }
a      { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* Visually hidden — for screen readers only */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — visible only on focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--tertiary);
  color: var(--on-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus {
  top: var(--space-sm);
}

/* Global focus-visible indicator */
:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 2px;
}
/* Remove outline for mouse clicks */
:focus:not(:focus-visible) {
  outline: none;
}


/* 2. DESIGN TOKENS
   ============================================================= */

:root {
  /* ── Colour ──────────────────────────────────────────────── */
  --surface:                 #f9f9f7;
  --surface-container-low:   #f4f4f2;
  --surface-container:       #eeeeec;
  --surface-container-high:  #e8e8e6;
  --surface-container-lowest:#ffffff;

  --primary:           #4f4f4e;
  --primary-container: #686766;
  --tertiary:          #932900;

  --on-surface:        #1a1c1b;
  --on-surface-muted:  #686766;
  --on-surface-subtle: #424655;
  --on-primary:        #ffffff;
  --outline-variant:   #c3c6d8;

  /* ── Spacing scale ──────────────────────────────────────── */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* ── Radius ─────────────────────────────────────────────── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 999px;

  /* ── Shadows ────────────────────────────────────────────── */
  --shadow-sm:  0px 1px 2px 0px rgba(0,0,0,0.05);
  --shadow-md:  0px 20px 25px -5px rgba(0,0,0,0.1), 0px 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-lg:  0px 25px 50px -12px rgba(0,0,0,0.25);

  /* ── Motion ─────────────────────────────────────────────── */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --duration:   300ms;
  --transition: var(--duration) var(--ease);

  /* ── Layout ─────────────────────────────────────────────── */
  --max-width:  1280px;

  /* ── Glass ──────────────────────────────────────────────── */
  --glass-bg:   rgba(249, 249, 247, 0.7);
  --glass-blur: blur(24px);

  /* ── Z-Index ────────────────────────────────────────────── */
  --z-nav:     50;
  --z-overlay: 45;
  --z-hamburger: 60;
}


/* 3. UTILITIES — reusable type & layout classes
   ============================================================= */

/* Eyebrow (small uppercase label) */
.eyebrow {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--tertiary);
  line-height: 16px;
}

/* Serif display heading */
.heading-display {
  font-family: 'Noto Serif', serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--on-surface);
}

/* Italic accent within headings */
.heading-display .italic {
  display: block;
  font-weight: 300;
  font-style: italic;
}

/* Body text — muted */
.body-muted {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  line-height: 1.625;
  color: var(--primary-container);
}

/* Small uppercase label */
.label-upper {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}

/* Material Symbols defaults */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}


/* 4. COMPONENTS
   ============================================================= */

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all var(--transition);
}

.nav__logo {
  font-family: 'Noto Serif', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--on-surface);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-family: 'Noto Serif', serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: -0.2px;
  color: var(--on-surface-muted);
  transition: color var(--transition);
}
.nav__link:hover       { color: var(--on-surface); }
.nav__link--active {
  color: var(--tertiary);
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--tertiary);
}

.nav__cta {
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  border: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  transition: opacity var(--transition);
}
.nav__cta:hover { opacity: 0.8; }

/* ── Hamburger (hidden by default, shown ≤1024) ────────────── */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: var(--z-hamburger);
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--on-surface);
  transition: all var(--transition);
  transform-origin: center;
}

.nav__hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.active span:nth-child(2) { opacity: 0; }
.nav__hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile overlay ────────────────────────────────────────── */
.nav__mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(249, 249, 247, 0.97);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  z-index: var(--z-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  transition: opacity var(--transition);
}
.nav__mobile-overlay.active { display: flex; opacity: 1; }
.nav__mobile-overlay #mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}
.nav__mobile-overlay .nav__link { font-size: 28px; font-weight: 400; }
.nav__mobile-overlay .nav__cta  { margin-top: var(--space-sm); padding: var(--space-sm) 40px; font-size: 16px; }


/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 20px 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  line-height: 20px;
}

.btn--primary {
  background: linear-gradient(163deg, var(--primary) 0%, var(--primary-container) 100%);
  color: var(--on-primary);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn--ghost {
  background: none;
  color: var(--on-surface);
  border: 1px solid #8b8fa6;
}
.btn--ghost:hover { border-color: var(--primary); }

.btn--tertiary {
  background: var(--tertiary);
  color: var(--on-primary);
  box-shadow: var(--shadow-lg);
}
.btn--tertiary:hover { filter: brightness(1.1); }

.btn--secondary {
  background: var(--surface-container-high);
  color: var(--on-surface);
}
.btn--secondary:hover { background: var(--surface-container); }

.btn--sm {
  padding: var(--space-sm) var(--space-lg);
  font-size: 12px;
}

.btn__icon {
  font-size: 18px;
  margin-right: 12px;
}


/* ── View Link (with arrow) ────────────────────────────────── */
.view-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition);
  flex-shrink: 0;
}
.view-link:hover { opacity: 0.7; }
.view-link .material-symbols-outlined {
  font-size: 18px;
  transition: transform var(--transition);
}
.view-link:hover .material-symbols-outlined { transform: translateX(4px); }


/* ── Quote Card ────────────────────────────────────────────── */
.quote-card {
  background: var(--surface-container-lowest);
  border: 1px solid rgba(195, 198, 216, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quote-card__text {
  font-family: 'Noto Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 20px;
  line-height: 1.625;
  color: var(--on-surface);
}

.quote-card__attribution {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-card__line {
  width: var(--space-lg);
  height: 1px;
  background: var(--tertiary);
  flex-shrink: 0;
}

.quote-card__author {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--on-surface);
}


/* ── Perspective Grid (asymmetric image collage) ───────────── */
.perspective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.perspective-grid__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.perspective-grid__col--offset { padding-top: var(--space-xl); }

.perspective-grid__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.perspective-grid__img img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  transition: transform var(--transition);
}
.perspective-grid__img:hover img { transform: scale(1.05); }

.perspective-grid__img--tall  { aspect-ratio: 3 / 4; }
.perspective-grid__img--short { aspect-ratio: 1 / 1; }


/* 5. SECTIONS
   ============================================================= */

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--space-3xl);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: grayscale(20%);
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(249,249,247,0.95) 0%,
    rgba(249,249,247,0.85) 40%,
    rgba(249,249,247,0.4)  70%,
    rgba(249,249,247,0)    100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero__inner {
  max-width: 768px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__heading {
  font-size: 96px;
  letter-spacing: -4.8px;
}

.hero__subtitle {
  max-width: 576px;
  font-size: 20px;
  color: var(--on-surface);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-top: var(--space-sm);
}


/* ── Apps (Our Apps) ───────────────────────────────────────── */
.apps {
  background: var(--surface);
  padding: var(--space-4xl) 0;
}

.apps__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.apps__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

.apps__header-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 576px;
}

.apps__header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.apps__platform-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}

.section-heading {
  font-family: 'Noto Serif', serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -1.2px;
  color: var(--on-surface);
}

.section-subtext {
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface-subtle);
}


/* ── App Entry Cards ───────────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

.app-entry {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.app-entry--offset { margin-top: var(--space-3xl); }

.app-entry__image {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-container-low);
  box-shadow: var(--shadow-sm);
}
.app-entry__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.app-entry__image:hover img { transform: scale(1.1); }

.app-entry__tag {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  padding: 6px 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--on-surface);
}

.app-entry__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.app-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.app-entry__title {
  font-family: 'Noto Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 36px;
  line-height: 1.1;
  color: var(--on-surface);
}

.app-entry__subtitle {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--on-surface-subtle);
  margin-top: var(--space-xs);
}

.app-entry__number {
  font-family: 'Noto Serif', serif;
  font-size: 24px;
  color: var(--tertiary);
}

.app-entry__desc {
  font-size: 18px;
  line-height: 1.625;
  color: var(--primary-container);
}

.app-entry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
}


/* ── App Store Badge ──────────────────────────────────────── */
.app-store-badge {
  display: inline-block;
  transition: opacity var(--transition);
}
.app-store-badge:hover { opacity: 0.75; }
.app-store-badge img {
  height: 44px;
  width: auto;
  display: block;
}
.app-store-badge--lg img { height: 48px; }

.app-store-badge--disabled {
  position: relative;
  display: inline-block;
  width: fit-content;
  cursor: default;
  pointer-events: none;
}
.app-store-badge--disabled img {
  opacity: 0.2;
  filter: grayscale(1);
}
.app-store-badge__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--on-surface);
  background: rgba(249, 249, 247, 0.6);
  border-radius: 6px;
}


/* ── App Detail Modal ────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 28, 27, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal.active {
  display: flex;
}

.modal__panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: var(--space-xl);
}

.modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--on-surface-muted);
  transition: color var(--transition);
  padding: 10px;
  line-height: 1;
}
.modal__close:hover { color: var(--on-surface); }

.modal__header {
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--surface-container);
  margin-bottom: var(--space-lg);
}

.modal__title {
  font-family: 'Noto Serif', serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.modal__subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--on-surface-muted);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.modal__section-heading {
  font-family: 'Noto Serif', serif;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: var(--on-surface);
  margin-bottom: var(--space-sm);
}

.modal__section-text {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--on-surface-muted);
}

.modal__feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__feature-item {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--on-surface-muted);
  padding-left: 20px;
  position: relative;
}
.modal__feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tertiary);
  opacity: 0.6;
}

.modal__media-placeholder {
  background: var(--surface-container-low);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal__media {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.modal__media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--on-surface-muted);
  gap: var(--space-xs);
}
.modal__media-empty .material-symbols-outlined {
  font-size: 48px;
  opacity: 0.3;
}
.modal__media-empty p {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  opacity: 0.5;
}

.modal__media-caption {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--on-surface-muted);
  text-align: center;
  padding: var(--space-sm);
  opacity: 0.7;
}

.modal__footer {
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: 1px solid var(--surface-container);
  display: flex;
  justify-content: center;
}


/* ── Philosophy ────────────────────────────────────────────── */
.philosophy {
  background: var(--surface-container-low);
  padding: var(--space-4xl) var(--space-lg);
}

.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.philosophy__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.philosophy__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.philosophy__heading { font-size: 60px; }

.philosophy__desc {
  font-size: 20px;
  line-height: 1.625;
  color: var(--primary-container);
}

.philosophy__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.pillar__title {
  font-family: 'Noto Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 24px;
  line-height: 32px;
  color: var(--on-surface);
  margin-bottom: 12px;
}

.pillar__desc {
  font-size: 14px;
  line-height: 1.625;
  color: var(--on-surface-subtle);
}


/* ── CTA ───────────────────────────────────────────────────── */
.cta {
  background: var(--surface);
  padding: var(--space-4xl) var(--space-lg);
}

.cta__container {
  max-width: 896px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  padding: 0 var(--space-lg);
}

.cta__icon {
  font-size: 56px;
  color: var(--tertiary);
  margin-bottom: var(--space-xs);
}

.cta__heading {
  font-size: 72px;
  letter-spacing: -3.6px;
}

.cta__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  padding-top: var(--space-xs);
}
.cta__actions .btn { padding: var(--space-md) var(--space-xl); }


/* ── Subscribe Form ────────────────────────────────────────── */
.subscribe-form {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  max-width: 480px;
  padding-top: var(--space-sm);
}

.subscribe-form__input {
  flex: 1;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  padding: var(--space-md) var(--space-md);
  border: 1px solid #8b8fa6;
  border-radius: var(--radius-md);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  transition: border-color var(--transition);
  min-width: 0;
}
.subscribe-form__input::placeholder { color: var(--on-surface-muted); }
.subscribe-form__input:focus {
  border-color: var(--tertiary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(147, 41, 0, 0.15);
}
.subscribe-form__input[aria-invalid="true"] {
  border-color: var(--tertiary);
}

.subscribe-form__btn {
  padding: var(--space-md) var(--space-lg) !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.subscribe-form__msg {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--on-surface-muted);
  min-height: 20px;
  margin-top: var(--space-sm);
  text-align: center;
}
.subscribe-form__msg.is-success { color: var(--tertiary); font-weight: 500; }
.subscribe-form__msg.is-error   { color: #b3261e; font-weight: 500; }


/* ── Contact Form (in modal) ───────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  letter-spacing: 0.3px;
}
.form-field input,
.form-field textarea {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid #8b8fa6;
  border-radius: var(--radius-md);
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  transition: border-color var(--transition);
  width: 100%;
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Manrope', sans-serif;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--tertiary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(147, 41, 0, 0.15);
}
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #b3261e;
}

.contact-form__btn {
  align-self: flex-start;
  margin-top: var(--space-xs);
}

.contact-form__msg {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: var(--on-surface-muted);
  min-height: 20px;
}
.contact-form__msg.is-success { color: var(--tertiary); font-weight: 500; }
.contact-form__msg.is-error   { color: #b3261e; font-weight: 500; }


/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--surface-container-low);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__logo {
  font-family: 'Noto Serif', serif;
  font-size: 18px;
  font-style: italic;
  color: var(--on-surface);
}

.footer__tagline,
.footer__link,
.footer__copy {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--on-surface-muted);
}

.footer__tagline {
  max-width: 280px;
  line-height: 2;
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.footer__link {
  transition: color var(--transition);
  padding: var(--space-xs) 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer__link:hover { color: var(--tertiary); }


/* 6. RESPONSIVE
   ============================================================= */

/* ── Tablet (≤ 1024px) ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav             { padding: 20px var(--space-md); }
  .nav__links      { display: none; }
  .nav > .nav__cta { display: none; }
  .nav__mobile-overlay .nav__cta { display: inline-flex; }
  .nav__hamburger  { display: flex; }

  .hero__heading   { font-size: 72px; letter-spacing: -3px; }
  .hero__content   { padding: 0 var(--space-md); }

  .apps            { padding: var(--space-3xl) 0; }
  .apps__container { padding: 0 var(--space-md); gap: var(--space-2xl); }
  .apps-grid       { gap: var(--space-xl); }
  .app-entry--offset  { margin-top: var(--space-xl); }
  .app-entry__title   { font-size: 28px; }
  .app-entry__desc    { font-size: 16px; }

  .section-heading { font-size: 40px; }

  .philosophy            { padding: var(--space-3xl) var(--space-md); }
  .philosophy__grid      { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .philosophy__heading   { font-size: 48px; }
  .philosophy__desc      { font-size: 18px; }

  .cta                   { padding: var(--space-3xl) var(--space-md); }
  .cta__heading          { font-size: 48px; letter-spacing: -2px; }
  .cta__actions .btn     { padding: 20px 36px; }

  .footer                { padding: 40px var(--space-md); }
}

/* ── Mobile (≤ 640px) ──────────────────────────────────────── */
@media (max-width: 640px) {
  .nav             { padding: var(--space-sm) 20px; }

  .hero            { padding-top: 72px; min-height: 85vh; }
  .hero__content   { padding: 0 20px; }
  .hero__heading   { font-size: 44px; letter-spacing: -1.5px; }
  .hero__subtitle  { font-size: 16px; }
  .hero__actions          { flex-direction: column; }
  .hero__actions .btn     { width: 100%; text-align: center; }

  .apps            { padding: var(--space-2xl) 0; }
  .apps__container { padding: 0 20px; gap: var(--space-xl); }
  .apps__header    { flex-direction: column; align-items: flex-start; gap: 20px; }
  .apps__header-right { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }

  .section-heading { font-size: 32px; }

  .apps-grid                 { grid-template-columns: 1fr; gap: 56px; }
  .app-entry--offset         { margin-top: 0; }
  .app-entry                 { gap: 28px; }
  .app-entry__image          { aspect-ratio: 1 / 1; }
  .app-entry__tag            { top: 20px; left: 20px; }
  .app-entry__title          { font-size: 28px; }
  .app-entry__desc           { font-size: 16px; }
  .app-entry__actions        { flex-direction: column; }
  .app-entry__actions .btn   { width: 100%; justify-content: center; }

  .philosophy          { padding: var(--space-2xl) 20px; }
  .philosophy__grid    { gap: var(--space-xl); }
  .philosophy__heading { font-size: 36px; }
  .philosophy__desc    { font-size: 16px; }
  .philosophy__pillars { grid-template-columns: 1fr; gap: var(--space-lg); }

  .perspective-grid            { grid-template-columns: 1fr; gap: 12px; }
  .perspective-grid__col       { gap: 12px; }
  .perspective-grid__col--offset { padding-top: 0; }

  .quote-card      { padding: var(--space-md); }
  .quote-card__text { font-size: 18px; }

  .cta                   { padding: var(--space-2xl) 20px; }
  .cta__container        { padding: 0; }
  .cta__heading          { font-size: 32px; letter-spacing: -1px; }
  .cta__actions          { flex-direction: column; width: 100%; }
  .cta__actions .btn     { width: 100%; padding: 20px var(--space-lg); }

  .subscribe-form        { flex-direction: column; gap: 12px; }
  .subscribe-form__btn   { width: 100%; }
  .contact-form__btn     { width: 100%; }

  .footer          { flex-direction: column; align-items: flex-start; padding: var(--space-lg) 20px; gap: var(--space-md); }
  .footer__links   { gap: 20px; }

  .modal__panel    { padding: var(--space-md); }
}


/* 7. REDUCED MOTION
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn--primary:hover        { transform: none; }
  .perspective-grid__img:hover img,
  .app-entry__image:hover img { transform: none; }
  .view-link:hover .material-symbols-outlined { transform: none; }
}
