:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7.25rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* Paper, ink and leaf */
  --color-bg: #f5efe4;
  --color-surface: #fbf7f0;
  --color-surface-offset: #ede5d6;
  --color-divider: oklch(0.3 0.02 150 / 0.12);
  --color-border: oklch(0.3 0.02 150 / 0.16);
  --color-text: #1e2a23;
  --color-text-muted: #56615a;
  --color-text-faint: #8a938c;
  --color-text-inverse: #f5efe4;
  --color-primary: #2f6b4f;
  --color-primary-hover: #24563f;
  --color-primary-active: #1b4331;
  --leaf: #2f6b4f;
  --leaf-light: #8fc5a3;
  --ink: #1e2a23;

  --radius-sm: 0.375rem; --radius-md: 0.625rem; --radius-lg: 1rem; --radius-xl: 1.75rem;
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 70 / 0.08);
  --shadow-md: 0 10px 30px -12px oklch(0.3 0.04 70 / 0.25);
  --shadow-lg: 0 40px 80px -30px oklch(0.25 0.04 70 / 0.45);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms var(--ease);

  --font-display: 'Chillax', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(var(--space-5), 5vw, var(--space-12));
}

body { font-family: var(--font-body); background: var(--color-bg); overflow-x: hidden; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--space-4); top: -100px; background: var(--ink); color: var(--color-text-inverse); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { top: var(--space-4); }

.eyebrow { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-primary); margin-bottom: var(--space-4); }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); letter-spacing: -0.015em; line-height: 1.08; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: oklch(0.955 0.017 80 / 0.82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--color-divider); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--ink); }
.brand-mark { flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.brand-sub { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-text-muted); margin-left: var(--space-2); }
.nav { display: flex; align-items: center; gap: clamp(var(--space-2), 2vw, var(--space-6)); list-style: none; }
.nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--color-text-muted); padding: var(--space-2) var(--space-1); display: inline-flex; min-height: 44px; align-items: center; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--color-border); border-radius: 999px; padding: 0 var(--space-4); }
.nav .nav-cta:hover { background: var(--ink); color: var(--color-text-inverse); border-color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-6); border-radius: 999px; font-size: var(--text-sm); font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--ink); color: var(--color-text-inverse); }
.btn-primary:hover { background: var(--color-primary); }
.btn-primary:active { background: var(--color-primary-active); }
.btn-ghost { border-color: var(--color-border); color: var(--ink); background: oklch(1 0 0 / 0.35); }
.btn-ghost:hover { border-color: var(--ink); background: oklch(1 0 0 / 0.7); }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; min-height: min(88vh, 860px); gap: clamp(var(--space-8), 4vw, var(--space-16)); padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.hero-inner { order: 1; padding: var(--space-16) 0; max-width: none; margin: 0; }
.hero-media { order: 2; align-self: stretch; margin: var(--space-6) 0 var(--space-6) 0; border-radius: var(--radius-xl) 0 0 var(--radius-xl); overflow: hidden; position: relative; min-height: 520px; box-shadow: var(--shadow-md); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 60%; transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero-copy { max-width: 34rem; }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 1rem + 5.2vw, 6.25rem); line-height: 0.98; letter-spacing: -0.03em; color: var(--ink); margin-bottom: var(--space-6); }
.hero-title em { font-style: normal; color: var(--color-primary); }
.hero-lede { font-size: var(--text-base); color: var(--color-text-muted); max-width: 30rem; margin-bottom: var(--space-8); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Apps */
.apps { padding-block: clamp(var(--space-20), 10vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24)); }
.section-head { margin-bottom: clamp(var(--space-10), 5vw, var(--space-16)); }
.feature { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); align-items: center; background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-xl); padding: clamp(var(--space-8), 5vw, var(--space-16)); overflow: hidden; position: relative; box-shadow: var(--shadow-md); }
.feature-copy > p { color: var(--color-text-muted); margin-bottom: var(--space-6); }
.tag { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.06em; color: var(--color-primary) !important; background: oklch(0.6 0.08 155 / 0.12); padding: var(--space-1) var(--space-3); border-radius: 999px; margin-bottom: var(--space-5) !important; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 0 oklch(0.5 0.1 155 / 0.5); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px oklch(0.5 0.1 155 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.5 0.1 155 / 0); } }
.feature-title { font-family: var(--font-display); font-weight: 500; font-size: var(--text-3xl); letter-spacing: -0.025em; line-height: 1; color: var(--ink); margin-bottom: var(--space-3); }
.feature-title sup { font-family: var(--font-body); font-size: 0.25em; font-weight: 500; vertical-align: super; margin-left: 2px; color: var(--color-text-muted); }
.feature-line { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl) !important; color: var(--color-primary) !important; line-height: 1.2; margin-bottom: var(--space-5) !important; }
.facts { display: grid; gap: 0; margin-block: var(--space-2) var(--space-8); border-top: 1px solid var(--color-divider); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--space-4); padding-block: var(--space-3); border-bottom: 1px solid var(--color-divider); }
.facts dt { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); padding-top: 3px; }
.facts dd { font-size: var(--text-sm); color: var(--ink); }
.feature + .feature { margin-top: var(--space-8); }
.feature-alt { grid-template-columns: 1.2fr 0.8fr; }
.feature-alt .feature-copy { order: 2; }
.feature-alt .feature-visual { order: 1; }
.feature-alt .feature-visual::before { background: radial-gradient(circle at 50% 50%, oklch(0.86 0.04 230 / 0.5), oklch(0.86 0.04 230 / 0) 65%); }
.browser { position: relative; z-index: 1; width: 100%; border-radius: var(--radius-lg); background: #fff; overflow: hidden; box-shadow: var(--shadow-lg), 0 0 0 1px oklch(0.2 0.02 160 / 0.08); transform: rotate(-1.5deg); transition: transform 600ms var(--ease); }
.feature:hover .browser { transform: rotate(0deg) translateY(-6px); }
.browser-bar { display: flex; gap: 6px; padding: 10px 12px; background: #ece6da; border-bottom: 1px solid oklch(0.2 0.02 160 / 0.08); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cfc6b5; }
.browser img { display: block; width: 100%; height: auto; }
.feature-visual { position: relative; display: grid; place-items: center; }
.feature-visual::before { content: ""; position: absolute; width: 115%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 50%, oklch(0.85 0.06 155 / 0.55), oklch(0.85 0.06 155 / 0) 65%); z-index: 0; }
.phone { position: relative; z-index: 1; width: min(300px, 100%); aspect-ratio: 9 / 18.4; border-radius: 44px; padding: 10px; background: #1b211d; box-shadow: var(--shadow-lg), inset 0 0 0 1.5px oklch(1 0 0 / 0.08); transform: rotate(3deg); transition: transform 600ms var(--ease); }
.feature:hover .phone { transform: rotate(0deg) translateY(-6px); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 35px; }

.next { margin-top: var(--space-6); display: flex; gap: var(--space-6); align-items: center; padding: var(--space-8) clamp(var(--space-6), 5vw, var(--space-16)); border: 1px dashed var(--color-border); border-radius: var(--radius-xl); color: var(--ink); }
.next-mark { flex: none; opacity: 0.85; --leaf: var(--leaf-light); }
.next-title { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); margin-bottom: var(--space-1); }
.next p { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Approach */
.approach { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); background: var(--color-surface-offset); }
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-10), 7vw, var(--space-24)); align-items: center; }
.approach-media { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4 / 5; }
.approach-media img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 50%; }
.approach-copy .section-title { margin-bottom: var(--space-10); }
.principles { list-style: none; display: grid; gap: 0; }
.principles li { display: grid; grid-template-columns: 3.25rem 1fr; gap: var(--space-4); padding-block: var(--space-6); border-top: 1px solid var(--color-border); }
.principles li:last-child { border-bottom: 1px solid var(--color-border); }
.num { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--color-primary); line-height: 1.3; }
.principles h3 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: var(--space-2); }
.principles p { color: var(--color-text-muted); font-size: var(--text-base); }

/* About */
.about { padding-block: clamp(var(--space-20), 10vw, var(--space-32)); }
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); align-items: start; }
.about-copy p { color: var(--color-text-muted); margin-bottom: var(--space-5); }
.about-copy strong { color: var(--ink); font-weight: 500; }
.about-copy .pull { font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; margin-bottom: var(--space-8); padding-left: var(--space-6); position: relative; }
.about-copy .pull::before { content: "“"; position: absolute; left: -0.1em; top: -0.15em; font-size: 2.4em; color: var(--leaf-light); line-height: 1; }

/* Contact */
.contact { background: var(--ink); color: var(--color-text-inverse); padding-block: clamp(var(--space-20), 10vw, var(--space-32)); text-align: center; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 50%; top: 0; width: 900px; height: 900px; transform: translate(-50%, -55%); background: radial-gradient(circle, oklch(0.6 0.08 155 / 0.22), oklch(0.6 0.08 155 / 0) 60%); pointer-events: none; }
.contact-inner { position: relative; display: grid; justify-items: center; gap: var(--space-5); }
.contact-mark { color: var(--color-text-inverse); --leaf: var(--leaf-light); margin-bottom: var(--space-2); }
.contact-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-3xl); letter-spacing: -0.025em; line-height: 1; }
.contact-lede { color: oklch(0.9 0.02 80 / 0.72); max-width: 32rem; }
.contact-email { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 0.6rem + 3.2vw, 2.25rem); color: var(--leaf-light); text-decoration: none; border-bottom: 1px solid oklch(0.8 0.07 155 / 0.4); padding-bottom: var(--space-1); margin-top: var(--space-2); overflow-wrap: anywhere; }
.contact-email:hover { color: var(--color-text-inverse); border-bottom-color: var(--color-text-inverse); }
.contact-note { font-size: var(--text-sm); color: oklch(0.9 0.02 80 / 0.6); margin-top: var(--space-4); }
.contact-note a { color: oklch(0.9 0.02 80 / 0.85); }

/* Footer */
.site-footer { background: var(--ink); color: oklch(0.9 0.02 80 / 0.6); border-top: 1px solid oklch(1 0 0 / 0.08); padding-block: var(--space-10); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-8); align-items: center; font-size: var(--text-xs); }
.footer-inner > p:first-of-type { justify-self: end; }
.footer-inner .fine { grid-column: 1 / -1; max-width: none; color: oklch(0.9 0.02 80 / 0.45); }
.brand-small { color: var(--color-text-inverse); --leaf: var(--leaf-light); }
.brand-small .brand-name { font-size: 1.1rem; }
.brand-small .brand-sub { color: oklch(0.9 0.02 80 / 0.55); }

/* Reveal (content visible without JS) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.brand-mark .kw-leaf, .contact-mark .kw-leaf { transform-origin: 18.5px 25px; animation: grow 1.4s var(--ease) both; }
@keyframes grow { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Responsive */
@media (max-width: 900px) {
  .feature, .feature-alt { grid-template-columns: 1fr; }
  .feature-alt .feature-copy { order: 2; }
  .browser { transform: none; }
  .feature-visual { order: -1; padding-block: var(--space-4); }
  .phone { width: min(240px, 70%); }
  .approach-grid, .about-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-left: 0; gap: 0; min-height: auto; }
  .hero-media { order: 1; margin: 0; border-radius: 0; height: 52vh; min-height: 320px; box-shadow: none; }
  .hero-inner { order: 2; padding: var(--space-12) var(--gutter) var(--space-16); }
  .approach-media { aspect-ratio: 3 / 2; }
}
@media (max-width: 640px) {
  .nav li:not(:last-child) { display: none; }
  .brand-sub { display: none; }
  .hero { grid-template-columns: 1fr; padding-left: 0; min-height: auto; gap: 0; }
  .hero-media { order: 1; margin: 0; border-radius: 0; min-height: 0; height: 46vh; min-height: 280px; box-shadow: none; }
  .hero-inner { order: 2; padding: var(--space-10) var(--gutter) var(--space-16); }
  .hero-title { font-size: clamp(2.75rem, 13vw, 3.5rem); }
  .facts div { grid-template-columns: 1fr; gap: var(--space-1); }
  .next { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner > p:first-of-type { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .phone { transform: none; }
}

/* App tiles */
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.app-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: var(--space-3); min-height: clamp(320px, 34vw, 440px); padding: clamp(var(--space-8), 4vw, var(--space-12)); border: 0; border-radius: var(--radius-xl); color: #fff; cursor: pointer; font: inherit; box-shadow: var(--shadow-lg); transition: transform 500ms var(--ease), box-shadow 500ms var(--ease); }
.app-tile:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -20px oklch(0.2 0.03 220 / 0.45); }
.app-tile:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 4px; }
.tile-sk { background: linear-gradient(150deg, #123d73 0%, #1f6fb8 55%, #2b9be0 100%); }
.tile-rt { background: linear-gradient(150deg, #0f1f31 0%, #163a3b 55%, #1f6a50 100%); }
.tile-glow { position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -18%; bottom: -30%; border-radius: 50%; filter: blur(10px); transition: transform 900ms var(--ease); }
.tile-sk .tile-glow { background: radial-gradient(circle, #ffc35a 0%, #ffc35a00 62%); opacity: .7; mix-blend-mode: screen; }
.tile-rt .tile-glow { background: radial-gradient(circle, #6fd3a0 0%, #6fd3a000 65%); opacity: .55; }
.app-tile:hover .tile-glow { transform: scale(1.18) translate(-6%, -6%); }
.tile-chip { font-size: var(--text-xs); font-weight: 500; letter-spacing: .04em; padding: 6px 12px; border-radius: 999px; background: oklch(1 0 0 / 0.14); border: 1px solid oklch(1 0 0 / 0.22); backdrop-filter: blur(6px); }
.tile-name { margin-top: auto; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 1rem + 4.4vw, 5rem); line-height: .95; letter-spacing: -0.035em; }
.tile-name sup { font-family: var(--font-body); font-size: .22em; font-weight: 500; vertical-align: super; opacity: .7; margin-left: 3px; }
.tile-line { font-size: var(--text-base); opacity: .86; max-width: 26ch; line-height: 1.45; }
.tile-more { margin-top: var(--space-3); display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: var(--text-sm); padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--ink); transition: gap 300ms var(--ease); }
.app-tile:hover .tile-more { gap: 14px; }
.next-line { display: flex; align-items: flex-start; line-height: 1.5; gap: 10px; margin-top: var(--space-8); color: var(--color-text-muted); font-size: var(--text-sm); }
.next-line strong { color: var(--ink); font-weight: 500; }
.next-line svg { flex: none; margin-top: 1px; }

/* App dialog */
.app-dialog { border: 0; padding: 0; background: transparent; width: min(1080px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow: visible; }
.app-dialog::backdrop { background: oklch(0.18 0.02 160 / 0.55); backdrop-filter: blur(6px); }
.app-dialog[open] { animation: dlg-in 380ms var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.dialog-close { position: absolute; top: 16px; right: 16px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--color-divider); background: var(--color-surface); color: var(--ink); cursor: pointer; }
.dialog-close:hover { background: var(--color-offset); }
.app-dialog .reveal { opacity: 1 !important; transform: none !important; }
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-tile { min-height: 280px; }
  .app-dialog .feature-visual { display: none; }
  .app-dialog .feature { padding-top: var(--space-16); }
}
@media (prefers-reduced-motion: reduce) { .app-dialog[open] { animation: none; } }
#dlg-recontrue .feature { grid-template-columns: 0.9fr 1.1fr; }
@media (max-width: 900px) { #dlg-recontrue .feature { grid-template-columns: 1fr; } }
