/* ---------------------------------------------------------------------------
   Deu Apps - shared styles.
   Layout, spacing and component structure are ported from tutikiapps.com so
   the two sites feel like siblings; the palette below is Deu's own (warm cream
   + dusty rose, matching the app icons). To restyle the whole site, edit only
   the custom properties in :root.
   --------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --background: #f7f4ef;
  --surface: #ffffff;
  --surface-hover: #fffdfb;

  --text: #2f2925;
  --text-strong: #1f1a17;
  --muted: #756d66;
  --muted-light: #9a918a;

  --border: #e4ded7;
  --border-soft: rgba(47, 41, 37, 0.07);

  --link: #9b5c62;
  --link-hover: #7d464c;
  --accent-soft: #f3ebec;
  --accent-glow: rgba(155, 92, 98, 0.06);
  --accent-glow-strong: rgba(155, 92, 98, 0.13);
}

/* Shared base */
html {
  scrollbar-gutter: stable;
  scroll-padding-top: 4rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}

body > nav,
body > header,
body > main,
body > footer {
  width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

strong {
  color: var(--text-strong);
  font-weight: 600;
}

/* Sticky site top bar with brand link */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
  padding: 1.125rem 0;
}

@media (max-width: 720px) {
  .topbar {
    background: var(--background);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem 0 clamp(1rem, 3.5vw, 3rem);
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.topbar .brand-logo {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  display: block;
  margin-top: 2px;
}

.topbar .brand:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 1.75rem 1rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted-light);
  font-size: 0.85em;
  letter-spacing: 0.005em;
}

footer p {
  margin: 0.5em 0;
}

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

footer a:hover {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* Focus state for keyboard users */
a:focus-visible,
.app-card:focus-visible,
.app-item:focus-visible,
.topbar .brand:focus-visible {
  outline: 2px solid var(--accent-glow-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* "Coming soon" pill, used while a page is still a placeholder. */
.badge {
  display: inline-block;
  margin: 0;
  padding: 0.4em 1em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------ Landing */

body.home header {
  padding: clamp(1.25rem, 3vw, 2rem) 1rem clamp(0.65rem, 1.6vw, 1.25rem);
  text-align: center;
}

body.home header h1 {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(1.5em, 4.5vw, 1.75em);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

body.home header .hero-sub {
  max-width: 580px;
  margin: clamp(0.65rem, 2vw, 0.85rem) auto 0;
  font-size: clamp(0.96em, 3.2vw, 1.02em);
  color: var(--muted);
  line-height: 1.55;
  text-wrap: pretty;
}

body.home main {
  max-width: 780px;
  margin: clamp(0.75rem, 2vw, 1rem) auto clamp(1.5rem, 4vw, 2rem);
  padding: 0 1rem;
}

/* Featured (primary) app card on the landing page */
.featured-app {
  margin-top: 0.5rem;
  position: relative;
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.app-card.featured {
  padding: clamp(1.1rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: clamp(14px, 3vw, 18px);
  gap: clamp(0.85rem, 3vw, 1.75rem);
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 8px 24px rgba(15, 15, 15, 0.04),
    0 28px 80px var(--accent-glow);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease;
}

.app-card.featured:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  text-decoration: none;
  box-shadow:
    0 2px 3px rgba(15, 15, 15, 0.06),
    0 16px 40px rgba(15, 15, 15, 0.07),
    0 38px 110px var(--accent-glow-strong);
}

.app-card.featured img {
  flex-shrink: 0;
  width: clamp(74px, 18.5vw, 96px);
  height: clamp(74px, 18.5vw, 96px);
  border-radius: clamp(16px, 4.2vw, 22px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.app-card.featured .app-card-body h2 {
  margin: 0 0 clamp(0.4rem, 1.5vw, 0.5rem);
  font-size: clamp(1.25em, 4.2vw, 1.4em);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.012em;
  line-height: 1.25;
  text-wrap: balance;
}

.app-card.featured .featured-desc {
  margin: 0 0 clamp(0.6rem, 2vw, 0.95rem);
  font-size: clamp(0.93em, 3.4vw, 0.97em);
  color: var(--muted);
  line-height: 1.6;
  text-wrap: pretty;
}

.app-card.featured .card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Micro-button CTA */
.app-card.featured .featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 0.95em;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition:
    background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card.featured .featured-cta .cta-arrow {
  display: inline-block;
  font-size: 1em;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card.featured:hover .featured-cta,
.app-card.featured:focus-visible .featured-cta {
  color: var(--text-strong);
  background: rgba(47, 41, 37, 0.035);
  border-color: rgba(47, 41, 37, 0.14);
}

.app-card.featured:hover .featured-cta .cta-arrow,
.app-card.featured:focus-visible .featured-cta .cta-arrow {
  transform: translateX(3px);
}

@media (max-width: 520px) {
  .app-card.featured {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-card.featured img {
    margin: 0 auto;
  }

  .app-card.featured .card-meta {
    justify-content: center;
  }
}

/* -------------------------------------------------------------- App detail */

body.app-detail header {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1.25rem);
  text-align: center;
}

body.app-detail .app-icon {
  display: block;
  width: clamp(88px, 22vw, 104px);
  height: clamp(88px, 22vw, 104px);
  margin: 0 auto clamp(1rem, 3vw, 1.25rem);
  border-radius: 22%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

body.app-detail header h1 {
  margin: 0 0 0.3em;
  font-size: clamp(1.7em, 5.5vw, 2.5em);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

body.app-detail header .tagline {
  margin: 0 0 clamp(0.85rem, 2.5vw, 1.25rem);
  font-size: clamp(1.02em, 3.5vw, 1.2em);
  color: var(--muted);
  line-height: 1.45;
  text-wrap: pretty;
}

body.app-detail main {
  max-width: 900px;
  margin: 2rem auto clamp(1.25rem, 2.5vw, 2rem);
  padding: 0 clamp(1rem, 3vw, 1.5rem);
  text-align: center;
}

body.app-detail .page-links {
  max-width: 420px;
  margin: 0 auto;
}

body.app-detail h2 {
  margin-top: 2rem;
  font-size: clamp(1.45em, 4.5vw, 1.6em);
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-wrap: balance;
}

/* Cross-links between an app page and its legal pages */
.page-links {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95em;
}

.page-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.page-links a + a {
  margin-left: 1.25rem;
}

/* ------------------------------------------------------- Privacy and terms */

body.privacy main {
  max-width: 720px;
  margin: 3rem auto 4rem;
  padding: 0 1.25rem;
  font-size: 1.05em;
  line-height: 1.75;
  color: var(--text);
  overflow-wrap: break-word;
}

body.privacy h1 {
  margin: 0 0 0.2em;
  font-size: 2.6em;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

body.privacy .updated {
  margin: 0 0 2.5em;
  color: var(--muted-light);
  font-size: 0.95em;
}

body.privacy h2 {
  margin: 2.6em 0 0.6em;
  font-size: 1.55em;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

body.privacy p {
  margin: 0 0 1.1em;
}

body.privacy ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 0 0 1.3em;
}

body.privacy li {
  margin-bottom: 0.55em;
}

body.privacy .contact {
  margin-top: 0.75em;
}

body.privacy main a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

body.privacy main a:hover {
  color: var(--link-hover);
}

body.privacy .page-links {
  margin-top: 3.5em;
}

@media (max-width: 600px) {
  body.privacy main {
    margin: 1.5rem auto 2.5rem;
    font-size: 1em;
  }

  body.privacy h1 {
    font-size: 2em;
  }

  body.privacy h2 {
    font-size: 1.3em;
  }
}

/* -------------------------------------------------------------------- 404 */

body.error main {
  max-width: 600px;
  margin: 6rem auto;
  padding: 0 1rem;
  text-align: center;
}

body.error h1 {
  margin: 0;
  font-size: 6em;
  font-weight: 700;
  color: var(--link);
  line-height: 1;
}

body.error p {
  margin: 0.5em 0 2em;
  font-size: 1.15em;
  color: var(--muted);
}
