/* --------------------------------------------------------
   Sequva landing
   Design system: Epilogue (display) + Plus Jakarta Sans (body)
   Palette: Teal primary from the Sequva app
   -------------------------------------------------------- */

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

:root {
  --font-display: "Epilogue", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-dim: #f0f1f3;
  --primary: #1289a1;
  --primary-hover: #0e6b7d;
  --primary-soft: rgba(18, 137, 161, 0.08);
  --primary-container: #d5f5f6;
  --accent: #22d3ee;
  --coral: #ff9f81;
  --coral-container: #ffe3da;
  --text: #0e191b;
  --text-muted: #6b7280;
  --border: #e6eaee;
  --outline: #d3d8de;

  --radius-xxs: 8px;
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-full: 100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1f23;
    --surface: #242a30;
    --surface-dim: #2c333a;
    --primary: #80deea;
    --primary-hover: #22d3ee;
    --primary-soft: rgba(128, 222, 234, 0.1);
    --primary-container: #1f343b;
    --accent: #22d3ee;
    --coral: #ffd1c5;
    --coral-container: rgba(106, 46, 34, 0.4);
    --text: #f6f7f9;
    --text-muted: #b5bcc6;
    --border: #3a424a;
    --outline: #2c333a;
  }
}

/* --- grain overlay --- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}
@media (prefers-color-scheme: dark) {
  .grain { opacity: 0.045; }
}

/* --- body + ambient background --- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 15% -15%, rgba(18, 137, 161, 0.14), transparent),
    radial-gradient(ellipse 60% 50% at 90% 15%, rgba(34, 211, 238, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 50% 110%, rgba(18, 137, 161, 0.06), transparent);
}

/* --- layout --- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- topbar --- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.logo svg {
  color: var(--primary);
}
.topbar-links {
  display: flex;
  gap: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.topbar-links a,
.topbar-links strong {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.topbar-links strong {
  color: var(--text);
  font-weight: 700;
}
.topbar-links a:hover {
  color: var(--primary);
}

/* --- hero --- */
.hero {
  text-align: center;
  padding: 5.5rem 0 4rem;
}

.hero-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
  padding-bottom: 3.5rem;
}
.hero-copy {
  width: 100%;
  max-width: 36rem;
}
.hero-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}
@media (min-width: 900px) {
  .hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: center;
    gap: 2rem 3rem;
    text-align: left;
    padding-bottom: 4.5rem;
  }
  .hero-split .hero-copy {
    max-width: none;
  }
  .hero-split .subtitle {
    margin-left: 0;
    margin-right: 0;
  }
  .hero-split .hero-cta {
    justify-content: flex-start;
    align-items: center;
  }
  .hero-visual {
    justify-content: flex-end;
  }
}

/* --- device frames (screenshots) --- */
.device-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a1214;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 32px 64px -16px rgba(14, 25, 27, 0.45),
    0 12px 24px -8px rgba(18, 137, 161, 0.12);
}
.device-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.device-frame--hero {
  max-width: min(300px, 88vw);
  transform: rotateY(-6deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
@media (min-width: 900px) {
  .device-frame--hero {
    max-width: min(280px, 32vw);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-visual:hover .device-frame--hero {
    transform: rotateY(-3deg) rotateX(1deg) translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .device-frame--hero {
    transform: none;
  }
  .hero-visual:hover .device-frame--hero {
    transform: none;
  }
}
.device-frame--tile {
  max-width: 220px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.72;
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 auto 2.2rem;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* App Store badge (Apple marketing asset) */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
  padding: 0.2rem 0.35rem;
  background: #ffffff;
  border-radius: var(--radius-xs);
  box-shadow: 0 2px 12px rgba(14, 25, 27, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.app-store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 25, 27, 0.14);
}
.app-store-badge img {
  display: block;
  width: 120px;
  height: auto;
  vertical-align: middle;
}
@media (prefers-color-scheme: dark) {
  .app-store-badge {
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  }
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(18, 137, 161, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 32px rgba(18, 137, 161, 0.35);
  transform: translateY(-1px);
}
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #1a1f23; }
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* --- steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 4.5rem;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.step:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 8px 36px rgba(18, 137, 161, 0.08);
}
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--primary);
  opacity: 0.12;
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}
@media (prefers-color-scheme: dark) {
  .step-num { opacity: 0.2; }
}
.step h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text);
  border: none;
  padding: 0;
}
.step p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- screenshots gallery --- */
.screenshots {
  position: relative;
  margin-bottom: 5rem;
  padding-top: 0.5rem;
}
.screenshots::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(100%, 900px);
  height: 55%;
  background: radial-gradient(ellipse, rgba(18, 137, 161, 0.07), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

/* Flex avoids empty grid cells when the last row isn’t full (e.g. 5 or 7 tiles). */
.screenshots-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.75rem 1.25rem;
}

.shot-card {
  text-align: center;
  flex: 0 1 220px;
  max-width: min(280px, 100%);
  min-width: 0;
}
.shot-card--wide {
  flex: 0 1 360px;
  max-width: min(400px, 100%);
}
.shot-card--wide .device-frame--tile {
  max-width: min(320px, 100%);
}

/* --- footer --- */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.8rem;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.45;
  letter-spacing: 0.04em;
}

/* ---- responsive ---- */
@media (max-width: 720px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 4rem 0 3rem;
  }
}
@media (max-width: 480px) {
  .topbar {
    padding-top: 1.5rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

/* ---- entrance animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero { animation: fadeUp 0.7s ease-out both; }
.steps { animation: fadeUp 0.7s 0.12s ease-out both; }
.screenshots { animation: fadeUp 0.7s 0.24s ease-out both; }
footer { animation: fadeUp 0.7s 0.36s ease-out both; }
