/* Milvello: mature, spacious, Apple-style. Logo colours: navy #1D2433, soft blue #7491D6. No cards, no borders. */
:root {
  --wash-top: #e6ebfa;      /* light matte wash of the icon's soft blue */
  --wash-bottom: #fbfcfe;   /* fading to near-white */
  --text: #1d2433;
  --muted: #5d6476;
  --faint: #9097a6;
  --accent: #3f5aa6;
  --blue-1: #8ba3e2;        /* back layer (soft blue) */
  --blue-2: #6d89d1;
  --navy-1: #2a3450;        /* front layer (navy) */
  --navy-2: #1d2433;
  --shadow: 29, 36, 51;
  --rule: rgba(29, 36, 51, 0.07);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wash-top: #1b2338;    /* deep navy, same idea */
    --wash-bottom: #0e121c;
    --text: #f2f3f6;
    --muted: #a7adba;
    --faint: #6f7584;
    --accent: #a9bcec;
    --blue-1: #8099d8;
    --blue-2: #6580c8;
    --navy-1: #313c5a;
    --navy-2: #222a3e;
    --shadow: 0, 0, 0;
    --rule: rgba(255, 255, 255, 0.07);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--wash-top) 0, var(--wash-bottom) 900px) no-repeat, var(--wash-bottom);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
main { flex: 1; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 40px;
}

/* Header */
.top .wrap { display: flex; align-items: center; height: 88px; }
.logo { display: inline-flex; }
.logo img { display: block; height: 26px; width: auto; }

/* Hero: text left, the icon's double layer right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(48px, 7vw, 112px);
  padding-block: clamp(64px, 11vh, 132px) clamp(96px, 15vh, 168px);
}
.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(40px, 4.8vw, 62px);
  text-wrap: balance;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.hero p {
  margin: 28px 0 0;
  max-width: 30ch;
  font-size: clamp(19px, 1.75vw, 23px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--muted);
}

/* The composition: soft-blue rounded square with a navy one overlapping it */
.art {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  justify-self: end;
}
.layer {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 23%;
}
.layer.back {
  top: 0; right: 0;
  background: linear-gradient(150deg, var(--blue-1), var(--blue-2));
  box-shadow: 0 34px 70px -34px rgba(var(--shadow), 0.30), 0 10px 24px -14px rgba(var(--shadow), 0.18);
  animation: float-back 11s ease-in-out infinite;
}
.layer.front {
  bottom: 0; left: 0;
  background: linear-gradient(150deg, var(--navy-1), var(--navy-2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 48px 90px -36px rgba(var(--shadow), 0.55),
    0 18px 36px -18px rgba(var(--shadow), 0.40);
  animation: float-front 9s ease-in-out infinite;
}
@keyframes float-front { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes float-back  { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* About */
.about { padding-block: clamp(32px, 6vh, 64px) clamp(120px, 18vh, 200px); }
.label {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.statement {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.022em;
}

/* Contact */
.contact { padding-block: 0 clamp(128px, 20vh, 220px); }
.contact h2 {
  margin: 0 0 14px;
  font-size: clamp(19px, 1.75vw, 23px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.mail {
  display: inline-block;
  font-size: clamp(18px, 1.6vw, 21px);   /* body-text size: quiet, not a headline */
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
  color: var(--accent);
  overflow-wrap: anywhere;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.5s ease;
}
.mail:hover, .mail:focus-visible { background-size: 100% 1px; }

/* Footer (as before) */
.foot { border-top: 1px solid var(--rule); font-size: 13px; color: var(--faint); }
.foot .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding-top: 24px; padding-bottom: 36px;
}
.foot nav { display: flex; gap: 20px; }
.foot a { transition: color 0.2s ease; }
.foot a:hover, .foot a:focus-visible { color: var(--text); }

/* Simple pages (privacy, terms) */
.page {
  max-width: 680px;
  padding-block: clamp(64px, 12vh, 120px) clamp(96px, 16vh, 160px);
}
.page h1 { margin: 0 0 20px; font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.page p { margin: 0 0 16px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.page a { color: var(--accent); }
.page .back { display: inline-block; margin-top: 24px; font-size: 16px; }

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

/* Gentle fade-and-rise. Only hidden while JS runs, so content is never lost. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .layer { animation: none; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .mail { transition: none; }
}

/* Phones: the composition sits above the text */
@media (max-width: 820px) {
  .wrap { padding-inline: 24px; }
  .top .wrap { height: 72px; }
  .logo img { height: 24px; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding-block: 24px 112px; }
  .art { order: -1; justify-self: center; width: min(260px, 66vw); }
  .foot .wrap { justify-content: center; text-align: center; }
}
