/* ============================================
   EVGENY HOTEI — DESIGN SYSTEM
   Milk, sand and sage in flat blocks. Thin ink outlines
   with an offset "echo". A light serif next to small labels.
   ============================================ */

:root {
  /* Flat block colours — taken from the portrait: sunlit white walls, sky in the shadows, garden green */
  --milk: #F6F9FB;      /* page: the white wall */
  --sand: #E3ECF4;      /* soft sky-white, the shaded wall */
  --sage: #D8ECDB;      /* light leaf green */
  --sage-deep: #A5D3AE; /* garden green in the sun */
  --leaf: #367A45;      /* accent strokes only */
  --forest: #1E3B2A;    /* the one dark band */

  /* Ink */
  --ink: #17271F;
  --text: #33443B;
  --muted: #586860;
  --hair: rgba(23, 39, 31, 0.16);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-display: clamp(3.3rem, 1.6rem + 7vw, 6.6rem);
  --fs-h1: clamp(2.6rem, 1.7rem + 3.6vw, 4.4rem);
  --fs-h2: clamp(2.15rem, 1.5rem + 2.6vw, 3.5rem);
  --fs-h3: clamp(1.7rem, 1.45rem + 0.9vw, 2.15rem);
  --fs-lead: clamp(1.08rem, 1.02rem + 0.3vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.92rem;
  --fs-label: 0.7rem;

  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --section-y: clamp(3.5rem, 2.6rem + 3.6vw, 6.25rem);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 0.7rem + 2.6vw, 2.75rem);
  --header-h: 76px;
  --arc: clamp(26px, 14px + 3.4vw, 64px);

  /* Shape */
  --radius: 22px;
  --radius-lg: 30px;
  --echo: 6px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --t-fast: 0.2s var(--ease);
  --t-base: 0.35s var(--ease);
}

/* Wide desktops: the whole page scales up a step instead of sitting small in the middle */
@media (min-width: 1600px) {
  :root {
    --container: 1360px;
  }

  html {
    font-size: 106.25%;
  }
}

@media (min-width: 1920px) {
  :root {
    --container: 1480px;
  }

  html {
    font-size: 112.5%;
  }
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--milk);
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* hidden means hidden, even for elements that set their own display */
[hidden] {
  display: none !important;
}

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

img {
  height: auto;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--forest);
  color: var(--milk);
  border-radius: 10px;
  transition: top var(--t-fast);
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.12;
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  font-weight: 400;
}

p + p {
  margin-top: 1em;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-fast);
}

strong {
  font-weight: 700;
  color: var(--ink);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

/* Tiny wide-spaced label, opened by a short wave */
.label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: var(--space-5);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink);
}

.label::before {
  content: '';
  flex: none;
  width: 30px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 8' fill='none' stroke='%23367A45' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M1 4c2.5-4 5-4 7.500 0s5 4 7.500 0 5-4 7.500 0 3 3 5.500 1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.label--center {
  justify-content: center;
}

/* A word carried by a wave line (sound, vibration) */
.wave-word {
  position: relative;
  display: inline-block;
  font-style: italic;
  white-space: nowrap;
}

.wave-word svg {
  position: absolute;
  left: 0;
  bottom: -0.16em;
  width: 100%;
  height: 0.2em;
  overflow: visible;
}

.wave-word path {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

/* drawn once when the page opens */
.js .wave-word--draw path {
  animation: wave-draw 1.5s var(--ease) 0.5s both;
}

@keyframes wave-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

/* One sentence set apart */
.statement {
  max-width: 21em;
  margin-inline: auto;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--ink);
  text-wrap: balance;
}

/* Serif link with a long arrow */
.go {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
}

.go::after {
  content: '→';
  font-family: var(--font-sans);
  font-size: 0.8em;
  transition: transform var(--t-base);
}

.go:hover::after {
  transform: translateX(6px);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Flat colour blocks — one idea each */
.block {
  position: relative;
  padding-block: var(--section-y);
  background: var(--fill, var(--milk));
}

.block--sand {
  --fill: var(--sand);
}

.block--sage {
  --fill: var(--sage);
}

.block--forest {
  --fill: var(--forest);
}

.block--flush {
  padding-top: 0;
}

/* The block rises over the one before it with a soft arc, like the rim of a bowl.
   The cap sits on top of the previous block, so that block's colour shows around it. */
.block--arc::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--arc) * -1);
  height: calc(var(--arc) + 1px);
  background: var(--fill, var(--milk));
  border-top: 1px solid var(--ink);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
}

.head .lead {
  max-width: 38rem;
  margin-top: var(--space-5);
}

.head .lead + .lead {
  margin-top: 0.8em;
}

.head--center {
  margin-inline: auto;
  text-align: center;
}

.head--center .lead {
  margin-inline: auto;
}

.cols {
  display: grid;
  gap: var(--space-5) clamp(2rem, 1rem + 5vw, 6rem);
}

@media (min-width: 920px) {
  .cols {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 1.1em;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-5 {
  margin-top: var(--space-5);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-7 {
  margin-top: var(--space-7);
}

.mt-8 {
  margin-top: var(--space-8);
}

.center {
  text-align: center;
}

/* ============================================
   OUTLINE + ECHO
   A thin ink outline with an offset copy behind it.
   ============================================ */

.echo {
  border: 1px solid var(--ink);
  box-shadow: var(--echo) var(--echo) 0 0 var(--echo-fill, var(--sage)), var(--echo) var(--echo) 0 1px var(--ink);
}

/* ============================================
   ICONS & GLYPHS
   ============================================ */

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}

.glyph {
  width: 48px;
  height: 48px;
  flex: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================
   MOTION — one gentle fade on scroll.
   Elements are only hidden when JS is running.
   ============================================ */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
