/*
  Bespoke stylesheet for Fold Or Cry

  This stylesheet defines a custom look inspired by 2026 web design trends.  The
  design features:
    • A bold hero with gradient shapes and parallax‑like animation【244105481639037†L225-L230】.
    • An irregular tile layout with vibrant gradients and micro‑interactions【244105481639037†L225-L230】【244105481639037†L270-L274】.
    • A dark mode toggle implemented via CSS variables.
    • Smooth transitions and responsive scaling.
*/

:root {
  /* Base light theme */
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #212529;
  --muted-text: #6c757d;
  --primary: #6f5be3;
  --secondary: #f26c8c;
  --accent: #ffd966;
  --tile-seen: linear-gradient(135deg, #f47969, #ffa276);
  --tile-guides: linear-gradient(135deg, #6ccaf8, #9a79ff);
  --tile-shop: linear-gradient(135deg, #74e39a, #42cabd);
  --tile-story: linear-gradient(135deg, #f8d87d, #ff9071);
  --hero-overlay-top: rgba(10, 10, 24, 0.18);
  --hero-overlay-bottom: rgba(10, 10, 24, 0.58);
  --button-bg: rgba(255, 255, 255, 0.10);
  --button-text: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
  --hero-title-color: #ffffff;
  --hero-tagline-color: #f3f3f7;
  --hero-kicker-color: rgba(255, 255, 255, 0.72);
}

body.dark {
  --bg: #101220;
  --surface: #17192d;
  --text: #e5e7ef;
  --muted-text: #a3a8bc;
  --primary: #9087f2;
  --secondary: #f289a5;
  --accent: #d2b05e;
  --tile-seen: linear-gradient(135deg, #c76565, #e38c71);
  --tile-guides: linear-gradient(135deg, #5fa1d7, #836acb);
  --tile-shop: linear-gradient(135deg, #5fa881, #369986);
  --tile-story: linear-gradient(135deg, #c2a363, #d27862);
  --hero-overlay-top: rgba(5, 6, 18, 0.24);
  --hero-overlay-bottom: rgba(5, 6, 18, 0.68);
  --button-bg: rgba(255, 255, 255, 0.08);
  --button-text: #ffffff;
  --shadow: rgba(0, 0, 0, 0.3);
  --hero-title-color: #f5f6ff;
  --hero-tagline-color: #c5cae9;
  --hero-kicker-color: rgba(255, 255, 255, 0.6);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

header.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  transition: background-color 0.5s ease;
}

body.dark header.header {
  background-color: rgba(16, 18, 32, 0.8);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03rem;
  color: var(--primary);
  transition: color 0.3s ease;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-list li a {
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.nav-list li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.nav-list li a:hover {
  color: var(--secondary);
}

.nav-list li a:hover::after {
  width: 100%;
}

/* Theme toggle button (floating in hero) */
#theme-toggle {
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

#theme-toggle:hover {
  transform: translateY(-1px);
}

.hero-theme-toggle {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  z-index: 4;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

body.dark .hero-theme-toggle {
  background: rgba(15,18,36,0.28);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100svh;
  text-align: center;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  padding: 0 1rem 2.25rem;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(255, 173, 120, 0.22), transparent 28%),
    linear-gradient(to bottom, var(--hero-overlay-top) 0%, rgba(10, 10, 24, 0.18) 28%, rgba(10, 10, 24, 0.18) 64%, var(--hero-overlay-bottom) 100%),
    url('assets/fold-hero-bg.png');
  background-size: cover;
  background-position: center 46%;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text);
  width: min(100%, 760px);
  max-width: 760px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.hero-kicker {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hero-kicker-color);
}

.hero-tagline {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.85rem);
  font-weight: 700;
  color: var(--hero-tagline-color);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  max-width: 24ch;
}

.cta-button {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.16);
}

/* Tiles section */
.tiles {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 200px;
  gap: 1.5rem;
  padding: 0 1rem 2rem;
  max-width: 1280px;
  margin: -3.5rem auto 0;
  position: relative;
  z-index: 3;
}

.tile {
  position: relative;
  border-radius: 1.25rem;
  color: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 12px var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.tile .tile-content {
  z-index: 2;
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
  z-index: 1;
  pointer-events: none;
}

.tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--shadow);
}

/* Tile sizes */
.tile-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 400px;
}

.tile-medium {
  grid-column: span 2;
  grid-row: span 1;
  min-height: 200px;
}

.tile-small {
  grid-column: span 1;
  grid-row: span 1;
  min-height: 200px;
}

/* Tile backgrounds */
.tile-seen {
  background: var(--tile-seen);
}
.tile-guides {
  background: var(--tile-guides);
}
.tile-shop {
  background: var(--tile-shop);
}
.tile-story {
  background: var(--tile-story);
}

.tile h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.tile p {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.85;
}

/* Story section */
.story-section {
  padding: 4rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.story-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.story-content p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted-text);
}

/* Footer */
.footer {
  padding: 2rem 1rem;
  text-align: center;
  background: var(--surface);
  color: var(--muted-text);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero {
    min-height: 78svh;
    padding: 0 0.9rem 1.5rem;
  }

  .hero-bg-image {
    background-size: cover;
    background-position: center 44%;
  }

  .hero-content {
    width: min(100%, 500px);
    gap: 0.7rem;
  }

  .hero-kicker {
    font-size: 0.72rem;
  }

  .hero-tagline {
    font-size: 1.02rem;
  }

  .cta-button {
    width: min(84vw, 360px);
    text-align: center;
  }

  .tiles {
    grid-auto-rows: 180px;
    margin-top: -2.35rem;
  }
  .tile-large {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 200px;
  }
  .tile-medium {
    grid-column: span 2;
    grid-row: span 1;
  }
  .tile-small {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 72svh;
    padding-bottom: 1.1rem;
  }

  .hero-bg-image {
    background-position: center 42%;
  }

  .hero-tagline {
    max-width: 18ch;
  }

  .tiles {
    margin-top: -1.8rem;
  }
}
@media (max-width: 900px) {
  .hero-theme-toggle {
    top: calc(env(safe-area-inset-top) + 0.75rem);
    right: 0.75rem;
  }
}
