:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --paper-deep: #ebe6d9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #151b18;
  --muted: #5f6963;
  --line: #d9d5ca;
  --brand: #173f35;
  --brand-light: #d9ece2;
  --accent: #ec633c;
  --accent-soft: #f9d8cc;
  --warning: #8a451d;
  --warning-bg: #fff1d9;
  --shadow: 0 18px 50px rgba(27, 35, 30, 0.10);
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li + li { margin-top: 0.38rem; }

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 242, 233, 0.92);
  border-bottom: 1px solid rgba(217, 213, 202, 0.88);
  backdrop-filter: blur(16px);
}

.nav,
.hero-inner,
.section-inner,
.footer-inner,
.legal-shell,
.content-shell {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 850;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff8dc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 680;
}

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

.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;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}

.language-picker > span[aria-hidden="true"] {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 900;
}

.language-picker select {
  max-width: 112px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.language-picker select:focus { outline: 0; }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(74px, 11vw, 148px) 0 clamp(62px, 8vw, 108px);
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -170px;
  top: -230px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: .6;
  filter: blur(2px);
  pointer-events: none;
}

.hero-grid,
.product-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
  gap: clamp(38px, 7vw, 88px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 { font-size: clamp(3rem, 7.8vw, 6.7rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.9rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.025em; }

.legal-content h1,
.support-copy h1 { font-size: clamp(2.7rem, 6vw, 5rem); }

.legal-content h2,
.support-copy h2 { font-size: clamp(1.45rem, 2.6vw, 2.15rem); }

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.36rem);
}

.hero-actions,
.button-row,
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.button.primary { background: var(--brand); color: #fff; }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(27,35,30,.11); }

.hero-card,
.portfolio-card,
.feature-card,
.legal-card,
.support-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card { padding: 28px; transform: rotate(1.5deg); }
.hero-card .hero-card-inner { transform: rotate(-1.5deg); }
.hero-card h2 { font-size: 1.8rem; }
.hero-card p { color: var(--muted); }

.app-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 20px;
  background: var(--app-color, var(--brand));
  color: var(--app-ink, #fff);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.05em;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--app-color, var(--brand)) 35%, transparent);
}

img.app-icon {
  display: block;
  object-fit: cover;
  background: var(--app-color, var(--brand));
}

.app-icon.small { width: 58px; height: 58px; border-radius: 16px; font-size: 1.25rem; }
.app-icon.large { width: 104px; height: 104px; border-radius: 28px; font-size: 2.2rem; }

.app--tripvaro { --app-color: #136f63; --app-ink: #fff8dc; }
.app--nappilo { --app-color: #b95f76; --app-ink: #fff8f6; }
.app--garantilo { --app-color: #c2862d; --app-ink: #20190d; }
.app--flatmory { --app-color: #5f70b8; --app-ink: #fff; }
.app--nudgivo { --app-color: #7c5aa6; --app-ink: #fff; }
.app--vehicord { --app-color: #2d627b; --app-ink: #fff; }
.app--expivault { --app-color: #a54d38; --app-ink: #fff; }
.app--duevance { --app-color: #42764e; --app-ink: #fff; }

.card-title-row,
.product-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mini-list,
.feature-list,
.plain-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li,
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mini-list li::before,
.feature-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: .62rem;
  border-radius: 50%;
  background: var(--accent);
}

.section { padding: clamp(70px, 9vw, 116px) 0; }
.section.tint { background: var(--paper-deep); }

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
}

.section-header > p { max-width: 520px; color: var(--muted); }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portfolio-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--app-color, var(--brand)) 55%, var(--line));
  box-shadow: var(--shadow);
}

.portfolio-card h3 { margin-top: 24px; }
.portfolio-card p { margin: 11px 0 22px; color: var(--muted); }
.card-link { margin-top: auto; color: var(--app-color, var(--brand)); font-weight: 820; }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 750;
}

.product-hero { padding: clamp(72px, 9vw, 124px) 0 clamp(60px, 8vw, 100px); }
.product-title-row h1 { font-size: clamp(3rem, 7vw, 6rem); }
.product-aside { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.product-aside strong { display: block; margin-bottom: 8px; font-size: 1.1rem; }

.three-grid,
.legal-links-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.legal-card,
.support-card { padding: 24px; box-shadow: none; }
.feature-card p,
.legal-card p,
.support-card p { margin: 12px 0 0; color: var(--muted); }
.legal-card { display: block; text-decoration: none; }
.legal-card:hover { border-color: var(--brand); box-shadow: 0 10px 28px rgba(27,35,30,.08); }
.legal-card .arrow { display: inline-block; margin-top: 24px; color: var(--accent); font-weight: 850; }

.privacy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr);
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 28px;
  background: var(--brand);
  color: #fff;
}

.privacy-band p { color: #d6e5df; }
.privacy-band .button { background: #fff; color: var(--brand); }

.legal-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 800px);
  justify-content: center;
  gap: clamp(34px, 6vw, 78px);
  padding: 64px 0 104px;
}

.legal-nav {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 7px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-right: 8px;
}

.legal-nav a {
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 680;
  text-decoration: none;
}

.legal-nav a:hover { background: var(--paper-deep); color: var(--ink); }
.legal-content { min-width: 0; }
.legal-meta { margin: 18px 0 32px; color: var(--muted); }
.legal-content section { scroll-margin-top: 100px; margin-top: 48px; }
.legal-content section > p:first-of-type { margin-top: 18px; }
.legal-content a { color: var(--brand); }

.notice-box,
.summary-box {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid #e2be86;
  border-radius: 16px;
  background: var(--warning-bg);
  color: #5e361d;
}

.notice-box p:last-child,
.summary-box p:last-child { margin-bottom: 0; }
.summary-box { border-color: #b9d3c5; background: #edf7f1; color: var(--ink); }

.legal-table { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .94rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--paper-deep); font-size: .82rem; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }

.content-shell { padding: 72px 0 110px; }
.support-copy { max-width: 800px; margin: 0 auto; }
.support-copy > .lead { margin-bottom: 42px; }
.support-copy section { margin-top: 48px; }
.contact-panel { padding: 28px; border-radius: 24px; background: var(--brand); color: #fff; }
.contact-panel p { color: #d6e5df; }
.contact-panel a { color: #fff; }

.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.footer-copy { color: var(--muted); font-size: .9rem; }
.footer-copy strong { display: block; color: var(--ink); margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; color: var(--muted); font-size: .9rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.not-found h1 { font-size: clamp(5rem, 17vw, 11rem); color: var(--accent); }
.not-found p { color: var(--muted); font-size: 1.2rem; }

@media (max-width: 960px) {
  .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .product-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 600px; }
  .three-grid, .legal-links-grid, .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-band { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav { min-height: 62px; }
  .nav-links a:not(:first-child) { display: none; }
  .legal-shell { grid-template-columns: 1fr; padding-top: 38px; }
  .legal-nav { position: static; display: flex; overflow-x: auto; max-height: none; padding-bottom: 8px; }
  .legal-nav a { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); }
  .section-header, .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .nav, .hero-inner, .section-inner, .footer-inner, .legal-shell, .content-shell { width: min(100% - 28px, var(--max)); }
  .apps-grid, .three-grid, .legal-links-grid, .support-grid { grid-template-columns: 1fr; }
  .portfolio-card { min-height: 260px; }
  .product-title-row { align-items: flex-start; flex-direction: column; }
  .app-icon.large { width: 88px; height: 88px; border-radius: 24px; }
  .hero-card { padding: 22px; }
  .language-picker { padding-inline: 7px; }
  .language-picker select { max-width: 94px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .legal-nav { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .legal-shell { display: block; width: 100%; padding: 0; }
  .notice-box, .summary-box { border: 1px solid #888; background: #fff; }
  a { color: #000; text-decoration: none; }
}
