/* Self-hosted fonts (Cormorant Garamond, Manrope — SIL OFL). Subsets: latin, latin-ext (Latvian), cyrillic (Russian). */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(fonts/cormorant-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(fonts/cormorant-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(fonts/cormorant-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Daniils L. — portfolio ============ */
:root {
  --ink: #14110f;
  --ink-2: #2a221c;
  --muted: #6f6359;
  --paper: #fbf7f1;
  --cream: #f3eadd;
  --gold: #d2a764;
  --accent: #b5602f;
  --accent-d: #964d24;
  --line: rgba(20, 17, 15, .12);
  --wa: #1fa855;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 20px;
  --pad: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1120px, 100% - 2 * var(--pad)); margin-inline: auto; }
.section { padding: clamp(72px, 11vw, 130px) 0; scroll-margin-top: 20px; }
.section--paper { background: var(--cream); }
.section--dark { background: var(--ink); color: var(--cream); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 680px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section--dark .kicker, .kicker--hero { color: var(--gold); }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 6.5vw, 60px); line-height: 1.04; letter-spacing: -.01em; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background-color .25s, color .25s; -webkit-tap-highlight-color: transparent; }
.btn[hidden] { display: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-d); }
.btn--ghost { color: var(--cream); border-color: rgba(243, 234, 221, .35); }
.btn--ghost:hover { background: rgba(243, 234, 221, .1); }
.btn--lg { min-height: 62px; padding: 0 34px; font-size: 17px; margin-top: 32px; }

/* Header */
.header { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top); color: var(--cream); transition: background-color .35s, color .35s, box-shadow .35s; }
.header.is-solid { background: rgba(251, 247, 241, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header__inner { width: min(1200px, 100% - 2 * var(--pad)); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 24px; }
.logo { font-family: var(--serif); font-size: 26px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.logo em { color: var(--gold); }
.header.is-solid .logo em { color: var(--accent); }
.nav { display: none; gap: 30px; margin-left: auto; font-size: 14px; font-weight: 600; }
.nav a { text-decoration: none; opacity: .85; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.lang { margin-left: auto; display: flex; border: 1px solid currentColor; border-radius: 999px; padding: 3px; }
.lang button { min-width: 42px; height: 34px; border: 0; background: none; cursor: pointer; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .06em; transition: background-color .25s, color .25s; }
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.header.is-solid .lang button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
@media (min-width: 860px) { .nav { display: flex; } .lang { margin-left: 8px; } }

/* Hero */
.hero { background: var(--ink); color: var(--cream); padding: calc(120px + env(safe-area-inset-top)) 0 clamp(64px, 10vw, 110px); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; right: -30vmax; top: -30vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(210, 167, 100, .16), transparent); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero__title { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 9vw, 96px); line-height: 1; letter-spacing: -.02em; max-width: 15ch; margin: 8px 0 24px; }
.hero__lead { font-size: clamp(17px, 2.2vw, 20px); color: rgba(243, 234, 221, .8); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__actions .btn { flex: 1 1 220px; }
@media (min-width: 600px) { .hero__actions .btn { flex: 0 0 auto; } }
.hero .container > * { animation: fadeUp .9s var(--ease) both; }
.hero .container > :nth-child(2) { animation-delay: .1s; }
.hero .container > :nth-child(3) { animation-delay: .2s; }
.hero .container > :nth-child(4) { animation-delay: .3s; }
.hero .container > :nth-child(5) { animation-delay: .4s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: clamp(48px, 8vw, 80px); padding-top: 28px; border-top: 1px solid rgba(243, 234, 221, .14); }
.proof strong { font-variant-numeric: lining-nums; display: block; font-family: var(--serif); font-size: clamp(34px, 6vw, 52px); font-weight: 600; color: var(--gold); line-height: 1; }
.proof span { display: block; font-size: 13px; color: rgba(243, 234, 221, .65); margin-top: 8px; line-height: 1.35; }

/* Works */
.works { display: grid; gap: 22px; }
.work { border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.work__img { display: block; overflow: hidden; aspect-ratio: 1200 / 630; background: var(--cream); }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.work__img:hover img { transform: scale(1.04); }
.work__body { padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.work__meta { color: var(--muted); font-weight: 600; font-size: 14px; }
.work__text { color: var(--ink-2); }
.work--next { background: var(--ink); color: var(--cream); border-color: var(--ink); justify-content: center; }
.work--next .kicker { color: var(--gold); }
.work--next .work__text { color: rgba(243, 234, 221, .75); }
.work--next .btn { align-self: flex-start; margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag--demo { background: var(--cream); border-color: transparent; color: var(--accent-d); }
.link-arrow { align-self: flex-start; margin-top: 6px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 8px 0; font-size: 17px; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (min-width: 900px) { .works { grid-template-columns: 1.6fr 1fr; } }

/* Features */
.features { display: grid; gap: 14px; }
.feature { background: var(--paper); border-radius: var(--r); padding: 28px; border: 1px solid var(--line); }
.feature__n { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 20px; color: var(--accent); font-weight: 600; }
.feature h3 { font-size: 19px; margin: 10px 0 8px; }
.feature p { color: var(--muted); font-size: 15px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* Steps */
.steps { display: grid; gap: 28px; counter-reset: s; }
.step { border-top: 1px solid var(--line); padding-top: 24px; }
.step__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--cream); font-weight: 700; }
.step h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 16px 0 8px; }
.step p { color: var(--muted); }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }

/* CTA */
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta .kicker::before { display: none; }
.cta .h2 { max-width: 16ch; }
.cta__text { margin-top: 18px; color: rgba(243, 234, 221, .75); font-size: 18px; max-width: 42ch; }

.footer { background: #0d0b09; color: rgba(243, 234, 221, .6); padding: 40px 0; font-size: 13px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer .logo { color: var(--cream); font-size: 22px; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
