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

:root {
  --bg: #0a0a0b;
  --bg-deep: #050505;
  --ink: #f0ece8;
  --muted: #9a938c;
  --accent: #e63946;
  --accent-soft: rgba(230, 57, 70, 0.16);
  --line: rgba(240, 236, 232, 0.1);
  --max: 980px;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(230, 57, 70, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 12%, rgba(80, 70, 65, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(30, 28, 28, 0.7), transparent 60%),
    linear-gradient(165deg, #121212 0%, #0a0a0b 50%, #050505 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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-size: 180px;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.logo-mark {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark:hover {
  text-decoration: none;
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 1.35rem;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* —— Hero —— */
.hero {
  min-height: calc(100svh - 4.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 3rem;
}

.hero-copy {
  animation: rise 0.9s ease-out both;
}

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

.brand {
  font-family: var(--font-sans);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  max-width: 18ch;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 32ch;
  margin-bottom: 1.75rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: #ff4d5a;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--ink);
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: rise 1.1s 0.15s ease-out both;
}

.device {
  width: min(240px, 58vw);
  aspect-ratio: 9 / 19;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2828, #101010);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: rotate(6deg);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-12px); }
}

.device-screen {
  height: 100%;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(230, 57, 70, 0.55), transparent 42%),
    linear-gradient(145deg, #221818, #0c0c0c);
  position: relative;
  overflow: hidden;
}

.device-glow {
  position: absolute;
  width: 120%;
  height: 45%;
  left: -10%;
  top: -8%;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.65), transparent 65%);
  animation: glow-pulse 5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.device-line {
  position: absolute;
  left: 14%;
  height: 8px;
  border-radius: 4px;
  background: rgba(244, 247, 250, 0.18);
}

.device-line.l1 { top: 28%; width: 55%; }
.device-line.l2 { top: 36%; width: 40%; background: #e63946; }
.device-line.l3 { top: 44%; width: 62%; }

/* —— Sections —— */
.apps,
.contact {
  padding: 3.5rem 0 1rem;
  border-top: 1px solid var(--line);
}

.apps h2,
.contact h2,
.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.section-lede {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
  opacity: 0.85;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #e63946, #a61e2a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.app-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.app-meta strong {
  font-weight: 600;
}

.app-meta span {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-action {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mail-link {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  transition: color 0.2s;
}

.mail-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.page a {
  color: var(--accent);
}

/* —— Inner pages —— */
.page {
  padding: 2.5rem 0 3rem;
  max-width: 640px;
}

.page h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.page p,
.page li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.page ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.page .muted {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.page strong {
  color: var(--ink);
  font-weight: 600;
}

/* —— Footer —— */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.company {
  font-family: var(--font-sans);
  font-weight: 700;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .company {
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  gap: 1rem;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.5rem 0 2.5rem;
    gap: 2.5rem;
  }

  .hero-visual {
    order: -1;
  }

  .device {
    width: min(180px, 46vw);
    transform: rotate(4deg);
    animation: float-mobile 7s ease-in-out infinite;
  }

  @keyframes float-mobile {
    0%, 100% { transform: rotate(4deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-8px); }
  }

  .brand {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .device,
  .device-glow,
  .hero-copy,
  .hero-visual {
    animation: none;
  }
}
