/* Appscape Inc. — corporate site styles */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #5f6368;
  --border: #e3e3e8;
  --accent: #0a66d8;
  --accent-hover: #0852ad;
  --accent-soft: #e8f1fd;
  --shape-1: #dbe8fb;
  --shape-2: #0a66d8;
  --shape-3: #1d1d1f;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --header-h: 64px;
  --container: 1120px;
  --gutter: 24px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 700;
}

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-dot { color: var(--accent); }

.site-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="true"] { color: var(--text); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }

/* Hero */

.hero {
  padding: 96px 0 112px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.lead {
  margin-top: 24px;
  max-width: 34em;
  color: var(--text-muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 440px;
  justify-self: end;
}
.shape { position: absolute; }
.shape-ring {
  inset: 6% 6% 6% 6%;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.shape-tile {
  top: 18%; left: 14%;
  width: 46%; height: 46%;
  border-radius: 28%;
  background: var(--shape-1);
  transform: rotate(-8deg);
  animation: float 9s var(--ease) infinite alternate;
}
.shape-pill {
  right: 12%; bottom: 20%;
  width: 40%; height: 18%;
  border-radius: 999px;
  background: var(--shape-2);
  box-shadow: 0 20px 40px -16px rgba(10, 102, 216, 0.5);
  animation: float 11s var(--ease) infinite alternate-reverse;
}
.shape-dot {
  top: 20%; right: 18%;
  width: 14%; height: 14%;
  border-radius: 50%;
  background: var(--shape-3);
  animation: float 7s var(--ease) infinite alternate;
}
.shape-grid {
  left: 16%; bottom: 14%;
  width: 26%; height: 18%;
  background-image: radial-gradient(var(--text-muted) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: 0.35;
}

@keyframes float {
  from { translate: 0 0; }
  to { translate: 0 -12px; }
}

/* Sections */

.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.03em;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}
.about-text {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1.6;
}
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.focus-list li {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.focus-list li:last-child { border-bottom: 1px solid var(--border); }
.focus-icon {
  flex: none;
  width: 28px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.focus-list h3 { font-size: 18px; letter-spacing: -0.01em; }
.focus-list p { margin-top: 4px; color: var(--text-muted); font-size: 15px; }

/* Products */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product-card:not(.product-card--placeholder):hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.18);
}
.product-body { padding: 28px 32px 32px; }
.product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge-dev { background: var(--accent-soft); color: var(--accent-hover); }
.product-platform { color: var(--text-muted); font-size: 14px; }
.product-name { font-size: 30px; letter-spacing: -0.03em; }
.product-category { margin-top: 6px; color: var(--text-muted); font-size: 15px; font-weight: 500; }
.product-desc { margin-top: 16px; font-size: 17px; }

.badge-live { background: #e6f6ec; color: #1a7f45; }

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.product-links a { font-size: 15px; font-weight: 600; }

.product-more {
  margin-top: 24px;
  padding: 24px 32px;
  border: 1.5px dashed #c9c9d0;
  border-radius: var(--radius);
  color: var(--text-muted);
}
.product-more strong { color: var(--text); }

/* DoubleBump visual */
.product-visual--doublebump {
  align-content: center;
  gap: 16px;
  background: radial-gradient(circle at 50% 42%, #2a2a10 0%, #111 62%);
}
.product-visual--doublebump img {
  width: 30%;
  max-width: 128px;
  height: auto;
  border-radius: 24%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 48px -12px rgba(250, 204, 21, 0.35);
}
.db-tagline {
  color: #facc15;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* minihouse illustration (CSS only) */
.product-visual {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
}
.product-visual--minihouse {
  background:
    radial-gradient(circle at 78% 28%, #fff6d8 0 9%, transparent 9.5%),
    linear-gradient(180deg, #e6f0fd 0%, #f4f8fe 72%, #e2eedb 72%, #d5e7cb 100%);
}
.mh-house { width: 30%; position: relative; translate: 0 10%; }
.mh-roof {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #ff8a65;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.mh-body {
  position: relative;
  width: 80%;
  margin: 0 auto;
  aspect-ratio: 5 / 4;
  background: #fffdf8;
  box-shadow: 0 16px 24px -16px rgba(0, 0, 0, 0.25);
}
.mh-window {
  position: absolute;
  top: 22%; left: 16%;
  width: 28%; aspect-ratio: 1;
  background: #a7c8f5;
  border-radius: 4px;
}
.mh-door {
  position: absolute;
  bottom: 0; right: 18%;
  width: 26%; height: 52%;
  background: #8d6e63;
  border-radius: 6px 6px 0 0;
}

/* Contact */

.contact-list {
  margin: 48px 0 0;
  max-width: 720px;
}
.contact-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: 1px solid var(--border); }
.contact-row dt { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.contact-row dd { margin: 0; font-size: 18px; font-weight: 500; }

/* Footer */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* Legal page */

.legal { padding: 80px 0 112px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 48px); letter-spacing: -0.03em; }
.legal .updated { margin-top: 12px; color: var(--text-muted); font-size: 15px; }
.legal h2 { margin-top: 48px; font-size: 22px; letter-spacing: -0.015em; }
.legal p, .legal ul { margin-top: 14px; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal .note {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Error page */

.error-page {
  min-height: calc(100vh - var(--header-h) - 100px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0;
}
.error-page h1 { font-size: clamp(48px, 8vw, 88px); letter-spacing: -0.04em; }
.error-page p { margin-top: 16px; color: var(--text-muted); font-size: 19px; }
.error-page .btn { margin-top: 32px; }

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */

@media (max-width: 1024px) {
  .hero { padding: 72px 0 88px; }
  .about-grid { gap: 40px; }
  .section { padding: 96px 0; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; max-width: 300px; justify-self: start; margin-left: -12px; }
  .about-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 14px 0; font-size: 17px; color: var(--text); }

  .hero { padding: 40px 0 72px; }
  .hero-art { max-width: 220px; }
  .section { padding: 72px 0; }
  .about-text { font-size: 18px; }
  .product-body { padding: 24px; }
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
