/* KYMA Estates (ClientDriven concept): base, nav, buttons, forms, dialog, footer.
   The opening screen is in hero.css, the page sections in sections.css, the detail page in home.css. */

:root {
  --lime: #b1ec80;
  --lime-deep: #9ee065;
  --lime-ink: #1f3a17;
  --ink: #14211b;
  --text: #2c3a33;
  --muted: #5f6e67;
  --line: #e1e7e2;
  --paper: #fff;
  --mist: #f2f5f2;
  --sage: #dbe7de;
  --bad: #b3261e;
  --r-card: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* the hero is the video's 1440 x 945 page; --u is one of its pixels. It fills the window's height on anything
     wider than 5:4 (80vw), so the pinned first screen leaves no strip under it; up to 9% of each side is then cropped */
  --hero-h: max(420px, min(100vh, 80vw));
  --u: calc(var(--hero-h) / 945);
  /* where the logo starts and the Sign up pill ends (158 in from the page's edge in the video) */
  --edge: max(20px, calc((100vw - var(--u) * 1440) / 2 + var(--u) * 158));
}
@supports (height: 100svh) { :root { --hero-h: max(420px, min(100svh, 80vw)); } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.nav :focus-visible, .hero :focus-visible { outline-color: #fff; }
.nav.is-solid :focus-visible { outline-color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--edge); }

/* ---------- nav: word-mark, a translucent pill of links, language, Sign up ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding: calc(var(--u) * 52) calc(var(--edge) - var(--u) * 3) 12px calc(var(--edge) + var(--u) * 2); color: #fff; pointer-events: none; transition: padding .4s var(--ease), background-color .3s, color .3s, box-shadow .3s; }
.nav-row { position: relative; display: flex; align-items: center; justify-content: space-between; height: max(40px, calc(var(--u) * 46)); }
.nav-row > * { pointer-events: auto; }
.logo { font-size: max(15px, calc(var(--u) * 19)); font-weight: 400; letter-spacing: .012em; text-decoration: none; white-space: nowrap; line-height: 1; }
.logo b { font-weight: 700; }
.links { position: absolute; left: 50%; top: 0; height: 100%; transform: translateX(-50%); display: flex; align-items: center; padding: 0 max(4px, calc(var(--u) * 5)); border-radius: 999px; background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1); transition: background-color .3s; }
.links a { position: relative; z-index: 1; display: flex; align-items: center; height: max(32px, calc(var(--u) * 36)); padding: 0 max(13px, calc(var(--u) * 20)); border-radius: 999px; font-size: max(13px, calc(var(--u) * 15)); font-weight: 400; text-decoration: none; white-space: nowrap; transition: color .3s, opacity .2s; }
.links a:hover { opacity: .78; }
.links a.is-on { color: #2c383d; opacity: 1; }
/* over the picture the white text gets a faint shadow, so it reads on a pale sky too */
.nav:not(.is-solid) .logo, .nav:not(.is-solid) .lang-btn, .nav:not(.is-solid) .links a:not(.is-on) { text-shadow: 0 1px 10px rgba(0, 52, 84, .38); }
.links .on { position: absolute; left: 0; top: 50%; width: 0; height: max(32px, calc(var(--u) * 36)); margin-top: calc(max(32px, calc(var(--u) * 36)) / -2); border-radius: 999px; background: #fff; box-shadow: 0 0 calc(var(--u) * 14) rgba(255, 255, 255, .45); transition: transform .5s var(--ease), width .5s var(--ease); }
.nav-right { display: flex; align-items: center; gap: max(12px, calc(var(--u) * 34)); }
.lang { position: relative; }
.lang-btn { display: flex; align-items: center; gap: max(6px, calc(var(--u) * 8)); padding: 6px 2px; border: 0; background: none; font-size: max(13px, calc(var(--u) * 15)); font-weight: 400; }
.lang-btn svg { width: max(18px, calc(var(--u) * 22)); height: max(18px, calc(var(--u) * 22)); filter: drop-shadow(0 1px 5px rgba(0, 52, 84, .3)); }
.nav.is-solid .lang-btn svg { filter: none; }
.lang-btn:hover { opacity: .8; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 236px; padding: 6px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 18px 50px rgba(15, 40, 30, .22); }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font-size: 15px; text-align: left; }
.lang-menu button:not(:disabled):hover { background: var(--mist); }
.lang-menu button:disabled { cursor: default; color: var(--muted); }
.lang-menu svg { width: 16px; height: 16px; }
.lang-menu em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; padding: 3px 8px; border-radius: 999px; background: var(--mist); }
.burger { display: none; position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.burger i { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger i:first-child { top: 16px; }
.burger i:last-child { top: 23px; }
.nav.is-open .burger i:first-child { top: 19px; transform: rotate(45deg); }
.nav.is-open .burger i:last-child { top: 19px; transform: rotate(-45deg); }

/* past the hero the nav sits on white, so everything turns dark and stays readable */
.nav.is-solid { padding-top: 12px; color: var(--ink); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.is-solid .links { background: rgba(20, 33, 27, .07); -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav.is-solid .links .on { box-shadow: 0 1px 6px rgba(20, 33, 27, .14); }
.nav.is-solid .burger { background: rgba(20, 33, 27, .07); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border: 0; border-radius: 999px; font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform .25s var(--ease), background-color .2s, box-shadow .25s, color .2s; }
.btn:active { transform: scale(.97); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { background: var(--lime-deep); box-shadow: 0 10px 26px rgba(120, 190, 70, .35); transform: translateY(-1px); }
.btn-line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.nav-cta { height: max(36px, calc(var(--u) * 40)); padding: 0 max(15px, calc(var(--u) * 17)); font-size: max(13px, calc(var(--u) * 15)); font-weight: 400; }
.linklike { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { text-decoration-thickness: 2px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form[hidden] { display: none; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-size: 14px; font-weight: 500; color: var(--ink); padding: 0; }
.field small { font-weight: 400; color: var(--muted); }
.field input:not([type=checkbox]), .field select, .field textarea { width: 100%; min-height: 52px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input[readonly] { background: var(--mist); color: var(--muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c5d0c8; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(177, 236, 128, .55); }
.field [aria-invalid=true] { border-color: var(--bad); }
.err { font-size: 13.5px; color: var(--bad); }
.err[hidden] { display: none; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick span { display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14.5px; transition: background-color .2s, box-shadow .2s, color .2s; }
.pick input:hover + span { box-shadow: inset 0 0 0 1.5px #b9c6bd; }
.pick input:checked + span { background: var(--lime); color: var(--lime-ink); box-shadow: none; }
.pick input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.tick { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; }
.tick input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #4f9a22; }
.form-note { font-size: 13.5px; color: var(--muted); }
.done { padding: 28px; border-radius: var(--r-card); background: var(--lime); color: var(--lime-ink); }
.done[hidden] { display: none; }
.done h3 { font: 600 26px/1.1 "Inter Tight", "Inter", sans-serif; letter-spacing: -.02em; margin-bottom: 10px; }
.done p + p { margin-top: 10px; }
.done .btn { margin-top: 18px; background: var(--lime-ink); color: #fff; }

/* ---------- dialog ---------- */
.dialog { width: min(520px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: var(--r-card); background: #fff; color: var(--text); box-shadow: 0 40px 120px rgba(10, 30, 22, .4); overflow: auto; }
.dialog::backdrop { background: rgba(14, 30, 24, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog[open] { animation: dialog-in .45s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.dialog-in { padding: 34px 32px 30px; }
.dialog h2 { font: 600 34px/1.02 "Inter Tight", "Inter", sans-serif; letter-spacing: -.025em; color: var(--ink); margin-bottom: 10px; padding-right: 40px; }
.dialog .lead { font-size: 17px; color: var(--muted); margin-bottom: 22px; }
.dialog-x { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--mist); font-size: 22px; line-height: 1; }
.dialog-x:hover { background: var(--sage); }

/* ---------- footer ---------- */
.footer { padding: clamp(56px, 7vw, 96px) 0 34px; background: var(--ink); color: #dfe7e1; }
.footer-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 38px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.footer .logo-big { font-size: clamp(34px, 6vw, 84px); letter-spacing: -.01em; color: #fff; }
.footer-top p { max-width: 30ch; color: #aebbb3; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 26px 0; font-size: 15px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links .linklike { color: var(--lime); }
.legal { font-size: 13.5px; color: #93a299; }

/* ---------- things that appear as you scroll ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--wait, 0s); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- narrow screens: the links move into a menu ---------- */
@media (max-width: 980px) {
  .burger { display: block; }
  .links { left: auto; right: 0; top: calc(100% + 10px); height: auto; transform: none; flex-direction: column; align-items: stretch; min-width: 230px; padding: 8px; border-radius: 22px; background: rgba(255, 255, 255, .97); color: var(--ink); box-shadow: 0 22px 60px rgba(15, 40, 30, .25); visibility: hidden; opacity: 0; translate: 0 -8px; transition: opacity .25s, translate .35s var(--ease), visibility 0s .35s; }
  .nav.is-open .links { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
  .nav.is-solid .links { background: #fff; }
  .links a { height: 46px; padding: 0 16px; font-size: 16px; }
  .links a.is-on { background: var(--lime); color: var(--lime-ink); }
  .nav:not(.is-solid) .links a:not(.is-on) { text-shadow: none; }
  .links .on { display: none; }
}
@media (max-width: 700px) {
  /* phone stage: 390 x 760 */
  :root { --hero-h: max(520px, min(100vh, 230vw)); --u: calc(var(--hero-h) / 760); --edge: 20px; --r-card: 24px; }
  @supports (height: 100svh) { :root { --hero-h: max(520px, min(100svh, 230vw)); } }
  body { font-size: 16px; }
  .nav { padding-top: 16px; }
  .nav-right { gap: 10px; }
  .logo { font-size: 15px; }
  .lang-btn { font-size: 15px; }
  .lang-btn svg { width: 20px; height: 20px; }
  .nav-cta { height: 38px; padding: 0 16px; font-size: 14.5px; }
  .nav-row { height: 40px; }
  .form .two { grid-template-columns: 1fr; }
  .dialog-in { padding: 28px 20px 22px; }
  .dialog h2 { font-size: 28px; }
}
@media (max-width: 380px) {
  .lang-btn span { display: none; }
}

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