/* Qatod — landing page */

:root {
  --ink: #0d0f12;
  --ink-soft: #33373d;
  --muted: #62655d;
  --paper: #f1eee6;          /* the beach in the shore photo, lifted */
  --line: rgb(13 15 18 / 0.14);
  --sea: #255d8e;            /* the open water in the shore photo */
  --night: #06090d;
  --white: #fff;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --radius: clamp(14px, 1.6vw, 24px);
  --wave-h: clamp(56px, 8vw, 120px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  interpolate-size: allow-keywords; /* lets the FAQ answers animate to their natural height */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

::selection { background: var(--ink); color: var(--paper); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.btn svg,
.contact__mails svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.btn:hover svg,
.contact__mails a:hover svg { transform: translate(2px, -2px); }
.btn--solid:hover svg { transform: translateX(3px); }

.btn--solid { background: var(--white); color: var(--ink); }
.btn--solid:hover { background: #e4dfd2; }

.btn--line {
  color: var(--white);
  background: rgb(6 9 13 / 0.22);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--line:hover { background: rgb(255 255 255 / 0.14); box-shadow: inset 0 0 0 1px var(--white); }

/* ---------- Shared ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Wavy section edges ---------- */

/* Paper sections spill over the photo sections next to them in two drifting layers. */
.pod,
.faq {
  position: relative;
  z-index: 1;
  background: var(--paper);
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--wave-h);
  color: var(--paper);
  pointer-events: none;
}
.wave svg { width: 100%; height: 100%; }
.wave path { fill: currentColor; }
.wave__back { opacity: 0.5; transform: translateX(calc(var(--drift, 0) * 1px)); }
.wave__front { transform: translateX(calc(var(--drift, 0) * -0.45px)); }

.wave--top { bottom: calc(100% - 1px); }
.wave--bottom { top: calc(100% - 1px); transform: scaleY(-1); }
.wave--top.wave--flip { transform: scaleX(-1); }
.wave--bottom.wave--flip { transform: scale(-1, -1); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(100svh, 600px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  background: #2a2b21;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: translate3d(0, calc(var(--p, 0) * 18%), 0);
}

.hero__img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: 50% 35%;
}

/* an even veil keeps the white lockup readable over the bright rocks */
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, rgb(8 10 7 / 0.42), rgb(8 10 7 / 0.62)),
    linear-gradient(180deg, rgb(8 10 7 / 0.25), rgb(8 10 7 / 0) 30%, rgb(8 10 7 / 0) 70%, rgb(8 10 7 / 0.35));
}
.hero__shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: calc(var(--p, 0) * 0.6);
}

.hero__inner {
  display: flex;
  justify-content: center;
  padding-block: clamp(56px, 10vh, 120px) calc(var(--wave-h) + clamp(24px, 6vh, 64px));
}

/* logo, then slogan, then the three buttons, centred as one block */
.lockup {
  width: min(100%, 900px, max(260px, 118svh - 140px));
  container-type: inline-size;
  text-align: center;
}

.logo--hero { width: 100%; height: auto; }

.lockup__row {
  margin-top: clamp(18px, 3.6cqi, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3.4cqi, 32px);
}

.hero__slogan {
  font-size: clamp(1.3rem, 4.4cqi, 2.6rem);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lockup .actions { justify-content: center; gap: clamp(8px, 1.4cqi, 12px); }
.lockup .btn {
  height: clamp(46px, 6.4cqi, 58px);
  padding: 0 clamp(16px, 2.2cqi, 22px) 0 clamp(18px, 2.7cqi, 26px);
  font-size: clamp(14px, 2cqi, 17px);
}

@container (max-width: 520px) {
  .lockup .actions .btn--solid { flex-basis: 100%; }
  .lockup .actions .btn--line { flex: 1; }
}

.logo__mark-lines { opacity: 0; }
.logo__mark-lines path {
  stroke-width: 2.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* ---------- The pod ---------- */

.pod { padding: clamp(72px, 9vw, 128px) 0 clamp(88px, 10vw, 140px); }

.statement {
  max-width: 13.2em;
  font-size: clamp(2.1rem, 5.6vw, 5.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.statement em { font-style: normal; color: var(--sea); transition: color 0.9s ease; }

.pod__pair {
  margin-top: clamp(44px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
}

.pod__frame {
  overflow: hidden;
  aspect-ratio: 1774 / 887;
  border-radius: var(--radius);
  background: #c9ced6;
}
.pod__frame img { width: 100%; height: 100%; object-fit: cover; }

/* the cutaway's white backdrop multiplies away, so the container floats on the page */
.pod__figure--inside img { width: 100%; height: auto; mix-blend-mode: multiply; }

/* ---------- How it works: five stops along one line, over the pink salt lake ---------- */

.offer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--wave-h) + clamp(64px, 8vw, 120px)) 0 calc(var(--wave-h) + clamp(72px, 9vw, 128px));
  background: #efc9cb;
  color: var(--ink);
}

.offer__media { position: absolute; inset: -10% 0; z-index: -2; }
.offer__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }

/* a pale salt haze over the lake, so the type stays calm on the pink */
.offer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(255 247 245 / 0.42), rgb(255 247 245 / 0.28) 55%, rgb(255 247 245 / 0.46));
}

.offer__title {
  max-width: 14em;
  font-size: clamp(2.1rem, 4.8vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.offer__title em { font-style: normal; color: var(--sea); }

.flow { --line-h: 180px; --node-w: 52px; --node-h: 60px; margin-top: clamp(48px, 6vw, 88px); }
.flow__list { list-style: none; padding: 0; margin: 0; position: relative; }

.flow__line { width: 100%; height: var(--line-h); overflow: visible; }
.flow__line path { fill: none; vector-effect: non-scaling-stroke; }
.flow__track { stroke: rgb(13 15 18 / 0.28); stroke-width: 1.25; stroke-dasharray: 2 7; stroke-linecap: round; }
.flow__trace {
  stroke: var(--ink);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--progress, 1));
}

.flow__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--node-w);
  height: var(--node-h);
  flex: none;
  color: var(--ink);
  transition: color 0.4s, scale 0.5s var(--ease);
}
.flow__node svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.flow__node path {
  fill: rgb(255 250 249 / 0.82);
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: fill 0.45s;
}
.flow__node b { position: relative; font: 500 13px/1 var(--mono); letter-spacing: 0.02em; }

.flow__step.is-lit .flow__node { color: var(--white); scale: 1.06; }
.flow__step.is-lit .flow__node path { fill: var(--ink); }

.flow__text h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.flow__text p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: rgb(13 15 18 / 0.78);
}

/* wide screens: the stops sit on the crests and dips of the line, text above or below */
@media (min-width: 900px) {
  .flow__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: auto var(--line-h) auto;
  }
  .flow__rail { grid-row: 2; grid-column: 1 / -1; }

  .flow__step {
    grid-row: 1 / span 3;
    display: grid;
    grid-template-rows: subgrid;
    justify-items: center;
    padding: 0 clamp(8px, 1.2vw, 18px);
    text-align: center;
  }
  .flow__step:nth-child(2) { grid-column: 1; }
  .flow__step:nth-child(3) { grid-column: 2; }
  .flow__step:nth-child(4) { grid-column: 3; }
  .flow__step:nth-child(5) { grid-column: 4; }
  .flow__step:nth-child(6) { grid-column: 5; }

  .flow__node { grid-row: 2; align-self: start; margin-top: calc(var(--line-h) * 0.8 - var(--node-h) / 2); }
  .flow__text { grid-row: 3; padding-top: 22px; max-width: 15em; }

  .flow__step--high .flow__node { margin-top: calc(var(--line-h) * 0.2 - var(--node-h) / 2); }
  .flow__step--high .flow__text { grid-row: 1; align-self: end; padding: 0 0 22px; }
}

/* narrow screens: one vertical line with the stops along it */
@media (max-width: 899px) {
  .flow__rail { display: none; }
  .flow__list { display: grid; gap: 36px; }
  .flow__list::before,
  .flow__list::after {
    content: "";
    position: absolute;
    left: calc(var(--node-w) / 2 - 0.75px);
    top: calc(var(--node-h) / 2);
    bottom: calc(var(--node-h) / 2);
    width: 1.5px;
  }
  .flow__list::before { background: rgb(13 15 18 / 0.2); }
  .flow__list::after { background: var(--ink); transform-origin: top; transform: scaleY(var(--progress, 1)); }
  .flow__step { display: grid; grid-template-columns: var(--node-w) 1fr; gap: 20px; align-items: start; }
  .flow__text { padding-top: 4px; }
}

/* ---------- FAQ ---------- */

.faq { padding: clamp(88px, 10vw, 140px) 0; }

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq__head { position: sticky; top: 48px; }

.faq__title {
  margin-top: clamp(18px, 2vw, 28px);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  list-style: none;
  cursor: pointer;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--sea); }

/* a plus that turns into a cross */
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor 0 0) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor 0 0) center / 1.5px 100% no-repeat;
  transition: transform 0.35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

.faq__a p { max-width: 44em; padding-bottom: 26px; line-height: 1.6; color: var(--ink-soft); }
.faq__a a { text-underline-offset: 3px; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: #203648;
}

.contact__media { position: absolute; inset: -14% 0; z-index: -2; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(6 9 13 / 0.5) 0%, rgb(6 9 13 / 0.55) 45%, rgb(6 9 13 / 0.82) 100%);
}

.contact__inner {
  min-height: min(100svh, 980px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(28px, 3.6vw, 44px);
  padding: calc(var(--wave-h) + clamp(56px, 8vw, 112px)) 0 clamp(20px, 3vw, 32px);
}

.contact__title {
  font-size: clamp(3.2rem, 10vw, 9rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.contact__mails {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(28px, 4vw, 64px);
}
.contact__mails a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(currentColor 0 0) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.contact__mails a:hover { background-size: 100% 1px; }
.contact__mails svg { width: 0.7em; height: 0.7em; opacity: 0.7; }

.contact__base {
  align-self: stretch;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  color: rgb(255 255 255 / 0.7);
}
.contact__base .logo { width: 104px; height: auto; color: var(--white); }

/* ---------- Motion (only when the visitor has not asked for less) ---------- */

.motion .hero__img { transform: scale(1.06); }
.motion.is-ready .hero__img { transform: none; transition: transform 2.8s cubic-bezier(0.16, 0.7, 0.2, 1); }

.motion [data-intro] { opacity: 0; transform: translateY(16px); }
.motion.is-ready [data-intro] {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s);
}

/* logo: the mark draws itself as a wireframe, fills in, and the letters rise from the baseline */
.motion .logo__mark-lines { opacity: 1; }
.motion .logo__mark-fill { opacity: 0; }
.motion .logo__letter { opacity: 0; transform: translateY(320px); }

.motion.is-ready .logo__mark-lines path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.65, 0, 0.25, 1) calc(0.3s + var(--i) * 0.05s);
}
.motion.is-ready .logo__mark-fill { opacity: 1; transition: opacity 0.7s ease 1.3s; }
.motion.is-ready .logo__mark-lines { opacity: 0; transition: opacity 0.6s ease 1.7s; }
.motion.is-ready .logo__letter {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s var(--ease) calc(0.75s + var(--i) * 0.08s),
    transform 1.2s var(--ease) calc(0.75s + var(--i) * 0.08s);
}

.motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.motion [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease) var(--delay, 0s), transform 1.1s var(--ease) var(--delay, 0s);
}

/* the three promises light up one after another */
.motion .statement em { color: inherit; }
.motion .statement.in em { color: var(--sea); }
.motion .statement.in em:nth-of-type(1) { transition-delay: 0.45s; }
.motion .statement.in em:nth-of-type(2) { transition-delay: 0.65s; }
.motion .statement.in em:nth-of-type(3) { transition-delay: 0.85s; }

/* the exterior render opens up from a smaller window */
.motion .pod__frame { clip-path: inset(5% 4% round var(--radius)); }
.motion .pod__frame img { transform: scale(1.12); }
.motion .pod__figure.in .pod__frame { clip-path: inset(0 round var(--radius)); transition: clip-path 1.4s var(--ease); }
.motion .pod__figure.in .pod__frame img { transform: none; transition: transform 1.8s var(--ease); }

/* the line is drawn by scrolling (script.js sets --progress), so it eases between frames */
.motion .flow__trace { transition: stroke-dashoffset 0.25s linear; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 860px) {
  .faq__grid { grid-template-columns: 1fr; }
  .faq__head { position: static; }
}

@media (max-width: 760px) {
  .pod__pair { grid-template-columns: 1fr; }
  .contact__mails { flex-direction: column; }
}
