/* ============================================
   STEPHANIE WARING PORTFOLIO - DESIGN SYSTEM
   ============================================ */

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

:root {
  /* COLOURS */
  --cream: #F5F0E8;
  --warm-white: #FAF7F2;
  --sand: #E8DFD0;
  --coral: #FF5757;
  --navy: #1C2B4A;
  --navy-75: rgba(28,43,74,0.75);
  --navy-60: rgba(28,43,74,0.6);
  --navy-50: rgba(28,43,74,0.5);

  /* COLOUR USAGE:
  --cream: default page bg, text on dark backgrounds
  --warm-white: alternate section bg, never pure white
  --sand: tertiary bg for stat/highlight sections
  --coral: accents ONLY - labels, CTAs, stats, decorative
           never use as large area background
  --navy: primary text, headings, body text, dark section backgrounds
  --navy-75: softer default paragraph text (homepage); case study
             body text and the homepage hero intro use full --navy
  --navy-60: secondary/subdued text, captions
  --navy-50: placeholder text, very subdued elements

  SECTION ALTERNATING RULE:
  Sections must alternate: cream, warm-white, cream, warm-white
  Never use the same background twice in a row.
  Sand and navy used sparingly for emphasis only. */

  /* CASE STUDY ACCENT - override per page */
  --case-accent: var(--coral);

  /* TYPOGRAPHY */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'DM Sans', sans-serif;

  /* TYPE SCALE */
  --text-display: clamp(52px, 8vw, 110px);
  --text-h1: clamp(40px, 5vw, 64px);
  --text-h2: clamp(32px, 4vw, 48px);
  --text-h3: clamp(24px, 3vw, 36px);
  --text-h4: 20px;
  --text-body: 16px;
  --text-small: 16px;
  --text-label: 16px;

  /* SPACING SCALE */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-block: 56px; /* MIN spacing between distinct content blocks / around images. Never go below this between separate blocks. */
  --space-xl: 80px;
  --space-xxl: 120px;

  /* LAYOUT / SPACING RULES (design-system level):
     1. SECTION RHYTHM — every content section has EVEN vertical padding
        from --section-padding-v (80px desktop / 60px mobile), top and
        bottom. No extra padding on inner wrappers; nothing bleeds across
        a section boundary. (Full-height hero is the one exception.)
     2. MIN BLOCK SPACING — between two distinct content blocks (and above
        or below any image), use at least --space-block (56px). Tight
        intra-group pairs (eyebrow-heading-body) may sit closer on purpose. */

  /* LAYOUT */
  --max-width: 1100px;
  --case-study-width: 900px;
  --section-padding-v: var(--space-xl);
  --section-padding-h: 48px;

  /* BORDERS */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* SHADOWS */
  --shadow-sm: 0 2px 12px rgba(28,43,74,0.06);
  --shadow-md: 0 4px 24px rgba(28,43,74,0.08);
  --shadow-lg: 0 8px 40px rgba(28,43,74,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

h2 {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

h3 {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

h4 {
  font-family: var(--font-sans);
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

p {
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--navy-75);
  margin-bottom: var(--space-md);
}

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

.text-display {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -2px;
}

.label {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  display: block;
  margin-bottom: var(--space-sm);
}

.caption {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--navy-50);
  text-align: center;
  display: block;
  margin-top: 12px;
  margin-bottom: var(--space-lg);
}

/* Cream text utilities for dark backgrounds */
.text-cream { color: var(--cream); }
.text-cream-60 { color: rgba(245,240,232,0.6); }
.text-cream-75 { color: rgba(245,240,232,0.75); }
.text-coral { color: var(--coral); }
.text-case-accent { color: var(--case-accent); }

/* ============================================
   LAYOUT
   ============================================ */

section {
  padding: var(--section-padding-v) var(--section-padding-h);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.container--narrow {
  max-width: var(--case-study-width);
  margin: 0 auto;
}

/* ============================================
   SECTION BACKGROUNDS
   ============================================ */

.bg-cream { background: var(--cream); }
.bg-warm-white { background: var(--warm-white); }
.bg-sand { background: var(--sand); }
.bg-navy { background: var(--navy); }
.bg-case-accent { background: var(--case-accent); }

.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-case-accent h1, .bg-case-accent h2,
.bg-case-accent h3, .bg-case-accent h4 {
  color: #FFFFFF;
}

.bg-navy p,
.bg-case-accent p {
  color: #FFFFFF;
}

/* Labels and accents on dark backgrounds keep
their own colour, do not override */

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
  background: var(--cream);
  box-shadow: 0 1px 0 rgba(28,43,74,0.08);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  font-weight: 900;
  color: var(--cream);
  letter-spacing: -1px;
  text-decoration: none;
  position: relative;
}

.nav-logo::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0;
  width: 100%;
  height: 2px;
  background: var(--coral);
}

nav.scrolled .nav-logo { color: var(--navy); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
}

nav.scrolled .nav-links a { color: var(--navy); }
.nav-links a:hover { opacity: 1; }

.nav-cta {
  background: var(--coral);
  color: var(--cream) !important;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  opacity: 1 !important;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--coral);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--navy);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn--secondary:hover {
  background: var(--navy);
  color: var(--cream);
}

/* ============================================
   IMAGES
   ============================================ */

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

.img-full {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.img-contained {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--warm-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.card--navy {
  background: var(--navy);
  color: var(--cream);
}

.card--navy p { color: rgba(245,240,232,0.75); }
.card--navy h4 { color: var(--cream); }

.card--accent-border {
  border-left: 3px solid var(--case-accent);
}

/* ============================================
   WORK CARDS
   ============================================ */

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--sand);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work-card:hover img { transform: scale(1.04); }

.work-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 28px;
  background: linear-gradient(to top,
    rgba(28,43,74,0.75) 0%, transparent 100%);
}

.work-card-sector {
  font-size: var(--text-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.work-card-title {
  font-family: var(--font-serif);
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-outer {
  overflow: hidden;
  background: var(--navy);
  padding: 28px 0;
}

.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 25s linear infinite;
  width: max-content;
}

.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DIVIDERS
   ============================================ */

.divider {
  width: 60px;
  height: 2px;
  background: var(--coral);
  display: block;
  margin: 0 auto var(--space-lg);
}

.divider--left { margin-left: 0; }

/* ============================================
   CASE STUDY PAGES
   ============================================ */

.case-study-hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-xxl) var(--section-padding-h)
           var(--space-xl);
}

.case-study-meta {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.case-study-meta-item label {
  font-size: var(--text-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--case-accent);
  display: block;
  margin-bottom: 4px;
}

.case-study-meta-item p {
  color: rgba(245,240,232,0.8);
  font-size: var(--text-small);
  margin: 0;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  :root {
    --section-padding-v: 60px;
    --section-padding-h: 24px;
  }

  nav { padding: 20px 24px; }
  .nav-links { gap: 20px; }

  h1 { font-size: 36px; letter-spacing: -1px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }

  .case-study-meta { flex-direction: column; gap: var(--space-md); }
}
