:root {
  --bg-paper: #f6f4ef;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-hover: #ffffff;
  --surface-muted: rgba(246, 244, 239, 0.72);
  --espresso: #3b2618;
  --ink-950: #26180f;
  --ink-800: #4a372a;
  --ink-600: #756458;
  --ink-500: #938377;
  --accent: #a66e46;
  --accent-deep: #7f4f2d;
  --accent-soft: rgba(166, 110, 70, 0.11);
  --border-hairline: rgba(59, 38, 24, 0.10);
  --border-strong: rgba(59, 38, 24, 0.20);
  --shadow-card: 0 1px 2px rgba(38, 24, 15, 0.04), 0 10px 28px -14px rgba(38, 24, 15, 0.10);
  --shadow-card-hover: 0 3px 8px rgba(38, 24, 15, 0.06), 0 22px 42px -16px rgba(38, 24, 15, 0.16);
  --radius-card: 1.35rem;
  --radius-icon: 1.15rem;
  --font-wordmark: 'Archivo Black', 'Plus Jakarta Sans', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--ink-950);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Soft cool-stone & warm-peach watercolor washes echoing the Play Store banner */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 52% 44% at 88% 10%, rgba(223, 180, 146, 0.42), transparent 68%),
    radial-gradient(ellipse 46% 42% at 14% 18%, rgba(196, 199, 192, 0.38), transparent 66%),
    radial-gradient(ellipse 55% 40% at 82% 85%, rgba(226, 193, 165, 0.22), transparent 70%);
  z-index: -2;
  pointer-events: none;
}

/* Subtle cold-press watercolor paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

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

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

.container {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 2rem;
  }
}

/* Top Navigation (Wordmark-only, no redundant emblem) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 239, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.85rem;
  gap: 1rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
}

.brand-wordmark {
  font-family: var(--font-wordmark);
  font-size: 1.05rem;
  letter-spacing: -0.045em;
  color: var(--espresso);
  line-height: 1;
}

.brand-tag {
  font-family: var(--font-wordmark);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--espresso);
  color: var(--bg-paper);
  padding: 0.22rem 0.4rem 0.18rem;
  line-height: 1;
  border-radius: 2px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 640px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-600);
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
  color: var(--espresso);
  background: rgba(59, 38, 24, 0.06);
}

.nav-link.is-active {
  background: var(--espresso);
  color: var(--bg-paper);
}

.nav-link.is-active:hover {
  background: var(--ink-950);
  color: var(--bg-paper);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--espresso);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.9);
}

@media (min-width: 640px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-hairline);
  padding: 0.65rem 0 0.85rem;
}

.mobile-menu.is-open {
  display: block;
}

@media (min-width: 640px) {
  .mobile-menu,
  .mobile-menu.is-open {
    display: none;
  }
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu-links .nav-link {
  display: block;
  border-radius: 0.6rem;
  padding: 0.6rem 0.85rem;
}

/* Main Content */
main {
  flex: 1;
}

/* Hero */
.hero {
  padding-top: clamp(3.25rem, 8vw, 5.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.75rem);
  text-align: center;
}

.hero-inner {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Play Store-inspired stacked wordmark lockup */
.hero-wordmark {
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 0.94;
}

.wordmark-main {
  font-family: var(--font-wordmark);
  font-size: clamp(1.8rem, 8.2vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  color: var(--espresso);
  white-space: nowrap;
}

.wordmark-labs {
  display: inline-block;
  margin-top: 0.14em;
  font-family: var(--font-wordmark);
  font-size: clamp(0.72rem, 2.7vw, 1.38rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--espresso);
  color: var(--bg-paper);
  padding: 0.24em 0.52em 0.2em;
  line-height: 1;
}

.hero-copy {
  width: 100%;
  max-width: 37rem;
  margin-top: clamp(2.25rem, 5vw, 3rem);
  text-align: left;
}

.hero-lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--ink-800);
  line-height: 1.62;
}

.hero-note {
  margin: 0.65rem 0 0;
  font-size: 0.93rem;
  color: var(--ink-600);
}

/* Portfolio Section */
.portfolio-section {
  padding-top: 0.5rem;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.section-header {
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-hairline);
}

.section-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--espresso);
}

/* 2x2 Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
  }
}

/* App Card */
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 1.65rem;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

@media (min-width: 640px) {
  .app-card {
    padding: 1.9rem;
  }
}

.app-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
}

.app-icon-wrap {
  flex-shrink: 0;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: var(--radius-icon);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 18px -6px rgba(38, 24, 15, 0.20), inset 0 0 0 1px rgba(38, 24, 15, 0.08);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  .app-icon-wrap {
    width: 6rem;
    height: 6rem;
  }
}

.app-card:hover .app-icon-wrap {
  transform: scale(1.03);
}

.app-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-icon-wrap.is-contained {
  padding: 0.7rem;
  background: #fbfaf8;
}

.app-icon-wrap.is-contained img {
  object-fit: contain;
}

.app-meta {
  min-width: 0;
  flex: 1;
}

.app-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink-950);
}

@media (min-width: 640px) {
  .app-title {
    font-size: 1.35rem;
  }
}

.app-subtitle {
  margin: 0.22rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.app-badge-row {
  margin-top: 0.55rem;
}

.app-desc {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-800);
  line-height: 1.62;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: currentColor;
}

.badge-live {
  color: #165e3a;
  background: rgba(22, 94, 58, 0.10);
  border: 1px solid rgba(22, 94, 58, 0.20);
}

.badge-soon {
  color: #824b14;
  background: rgba(186, 114, 34, 0.12);
  border: 1px solid rgba(186, 114, 34, 0.25);
}

.badge-lab {
  color: var(--ink-600);
  background: rgba(59, 38, 24, 0.06);
  border: 1px solid rgba(59, 38, 24, 0.14);
}

.badge-retired {
  color: #6b6158;
  background: rgba(107, 97, 88, 0.11);
  border: 1px solid rgba(107, 97, 88, 0.22);
}

/* Card Footer Actions */
.app-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--border-hairline);
}

.store-link {
  display: inline-flex;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.94;
}

.store-link:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.store-link img {
  height: 2.3rem;
  width: auto;
}

.footer-note {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-600);
}

/* Teaser Card Variant */
.app-card--teaser {
  background: rgba(255, 255, 255, 0.52);
  border: 1.5px dashed rgba(59, 38, 24, 0.22);
  box-shadow: none;
}

.app-card--teaser:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(166, 110, 70, 0.45);
  box-shadow: var(--shadow-card);
}

.teaser-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0ece4, #e5ded2);
  color: var(--espresso);
  box-shadow: inset 0 0 0 1px rgba(59, 38, 24, 0.08);
}

/* Retired Card Variant */
.app-card--retired {
  background: var(--surface-muted);
  border-color: rgba(59, 38, 24, 0.09);
  box-shadow: none;
}

.app-card--retired:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-card);
}

.app-card--retired .app-icon-wrap img {
  filter: grayscale(72%) opacity(0.8);
  transition: filter 0.3s ease;
}

.app-card--retired:hover .app-icon-wrap img {
  filter: grayscale(20%) opacity(0.95);
}

.app-card--retired .app-title {
  color: var(--ink-800);
}

.app-card--retired .app-desc {
  color: var(--ink-600);
}

/* Privacy Policy Page */
.policy-hero {
  padding-top: clamp(2.25rem, 5vw, 3.75rem);
  padding-bottom: 2rem;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 3.1rem);
  margin-bottom: 4.25rem;
}

.policy-header {
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-hairline);
}

.policy-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.policy-title {
  margin: 0.45rem 0 0.45rem;
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 4.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--espresso);
}

.policy-updated {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-600);
}

.policy-body {
  max-width: 72ch;
}

.policy-body h2 {
  margin: 2.15rem 0 0.7rem;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--espresso);
}

.policy-body p {
  margin: 0 0 1rem;
  color: var(--ink-800);
}

.policy-body ul {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
  color: var(--ink-800);
}

.policy-body li {
  margin-bottom: 0.45rem;
}

.policy-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.policy-body a:hover {
  color: var(--espresso);
}

.policy-callout {
  margin: 1.4rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: 0.85rem;
  background: var(--accent-soft);
  border: 1px solid rgba(166, 110, 70, 0.22);
  color: var(--ink-950);
  font-size: 0.94rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  background: rgba(59, 38, 24, 0.03);
  padding: 1.85rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-600);
}

.footer-contact a:hover {
  color: var(--espresso);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-policy-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-emblem {
  height: 3.3rem;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(59, 38, 24, 0.14));
}

/* Subtle Entrance Animation */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: riseIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal-delay-1 { animation-delay: 0.05s; }
.reveal-delay-2 { animation-delay: 0.10s; }
.reveal-delay-3 { animation-delay: 0.15s; }
.reveal-delay-4 { animation-delay: 0.20s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }
  .app-card,
  .app-icon-wrap,
  .store-link {
    transition: none;
  }
}
