/* App studio landing — typography: Fraunces + DM Sans */

:root {
  --bg: #0c0c0e;
  --bg-elevated: #141418;
  --surface: #1a1a20;
  --text: #f4f2ed;
  --text-muted: #9a9690;
  --accent: #e8a54b;
  --accent-soft: rgba(232, 165, 75, 0.15);
  --border: rgba(244, 242, 237, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}

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

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

.wrap {
  width: min(100% - var(--space-lg), var(--max));
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(to bottom, var(--bg) 40%, transparent);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin-inline: auto;
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(12, 12, 14, 0.75);
  backdrop-filter: blur(12px);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 165, 75, 0.35);
}

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

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(80px + var(--space-xl)) var(--space-md) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 70vw;
  max-width: 900px;
  height: 70vw;
  max-height: 900px;
  top: -20%;
  right: -15%;
  background: radial-gradient(
    circle,
    rgba(232, 165, 75, 0.12) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  width: fit-content;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
  max-width: 12ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0 0 var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.hero-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

/* Sections */
section {
  padding: var(--space-2xl) var(--space-md);
}

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-lg);
  max-width: 18ch;
}

/* Services */
.services {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.services-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service-card {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s;
}

.service-card:hover {
  border-color: rgba(232, 165, 75, 0.35);
  transform: translateY(-2px);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

/* Work */
.work-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.work-visual {
  flex: 1;
  min-height: 160px;
  background: linear-gradient(
    135deg,
    var(--bg-elevated) 0%,
    #1f1f28 50%,
    var(--accent-soft) 100%
  );
  position: relative;
}

.work-visual::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: var(--radius);
  border: 1px dashed rgba(244, 242, 237, 0.12);
}

.work-body {
  padding: var(--space-md) var(--space-lg);
}

.work-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.work-body p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: var(--space-sm);
}

.work-tags span {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-muted);
}

/* Process */
.process {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.process-steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
}

@media (min-width: 640px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-step {
  position: relative;
  padding-top: var(--space-md);
}

.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  color: var(--border);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-sm);
}

.process-step h3 {
  font-size: 1.1rem;
  margin: 0 0 var(--space-xs);
}

.process-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* CTA */
.cta-block {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(
    160deg,
    var(--surface) 0%,
    var(--bg-elevated) 100%
  );
}

.cta-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 var(--space-sm);
}

.cta-block > p {
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 42ch;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-footer .logo {
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.copyright {
  width: 100%;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .site-header .inner {
    padding-inline: var(--space-sm);
  }
}
