@font-face {
  font-family: "Onest";
  src: url("assets/onest.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --wall: #f1e8db;
  --hero-bg: #f0e6d8;
  --ink: #2b241d;
  --ink-soft: #5f544a;
  --ink-mute: #7a6d5f;
  --accent: #a8825a;
  --glass-line: rgba(43, 36, 29, 0.1);
  --footer-dark: #3a2f26;
  --footer-darker: #2a221b;
  --footer-ink: #f6ece0;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: "Onest", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s linear;
}

*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
h1, h2, h3, p, dl, dd, ol, ul, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* ---------- keyframes ---------- */
@keyframes lyRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lyDraw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes lySettle { from { transform: scale(1.06); filter: brightness(1.1) saturate(0.9); } to { transform: none; filter: none; } }
@keyframes lyGlass { from { opacity: 0; transform: translateY(26px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes lyDriftA { 0% { transform: translate3d(-4%, 0, 0) scale(1); } 50% { transform: translate3d(8%, 6%, 0) scale(1.14); } 100% { transform: translate3d(-4%, 0, 0) scale(1); } }
@keyframes lyDriftB { 0% { transform: translate3d(4%, 2%, 0) scale(1.05); } 50% { transform: translate3d(-7%, -5%, 0) scale(0.92); } 100% { transform: translate3d(4%, 2%, 0) scale(1.05); } }
@keyframes lyBeam { 0% { transform: translateX(0) skewX(-24deg) scaleY(1); opacity: 0.75; } 50% { transform: translateX(6vw) skewX(-20deg) scaleY(1.08); opacity: 1; } 100% { transform: translateX(0) skewX(-24deg) scaleY(1); opacity: 0.75; } }
@keyframes lyFill { 0% { transform: translateX(-60%) skewX(-20deg); } 100% { transform: translateX(160%) skewX(-20deg); } }
@keyframes lyDot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- ambient light ---------- */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  transition: opacity 1.4s ease;
}
.ambient .spot-a {
  position: absolute; left: -14vw; top: -18vh; width: 66vw; height: 72vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 252, 244, 0.95), rgba(255, 247, 232, 0.35), rgba(255, 247, 232, 0));
  filter: blur(34px); animation: lyDriftA 46s ease-in-out infinite; will-change: transform;
}
.ambient .spot-b {
  position: absolute; right: -12vw; top: 24vh; width: 52vw; height: 60vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 240, 220, 0.7), rgba(246, 225, 199, 0.22), rgba(246, 225, 199, 0));
  filter: blur(42px); animation: lyDriftB 62s ease-in-out infinite; will-change: transform;
}
.ambient .beam {
  position: absolute; left: 14vw; top: -20vh; width: 26vw; height: 150vh;
  background: linear-gradient(100deg, rgba(255, 252, 246, 0), rgba(255, 251, 241, 0.55), rgba(255, 252, 246, 0));
  filter: blur(30px); transform-origin: 50% 0; animation: lyBeam 38s ease-in-out infinite; will-change: transform;
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 100svh; background: var(--hero-bg); isolation: isolate;
}
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 76% 16%;
  animation: lySettle 2.6s var(--ease) both;
}
.hero-veil-side {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(104deg, rgba(246, 239, 229, 0.92) 0%, rgba(246, 239, 229, 0.72) 30%, rgba(246, 239, 229, 0.24) 56%, rgba(246, 239, 229, 0) 78%);
}
.hero-veil-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 1;
  background: linear-gradient(rgba(241, 232, 219, 0), rgba(241, 232, 219, 0.75) 58%, var(--wall));
}

.hero-header {
  position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 16px 28px;
  justify-content: space-between; align-items: center;
  padding: clamp(18px, 2.6vw, 34px) clamp(18px, 4vw, 64px);
  animation: lyRise 1s 0.05s var(--ease) both;
}
.logo {
  font-size: 13px; letter-spacing: 0.26em; font-weight: 500; padding: 10px 18px; border-radius: 999px;
  background: rgba(255, 253, 249, 0.42); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.55); transition: background 0.5s var(--ease);
}
.logo:hover { background: rgba(255, 253, 249, 0.66); color: var(--ink); }

.hero-nav {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: 999px;
  background: rgba(255, 253, 249, 0.36); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.hero-nav a {
  font-size: 12.5px; letter-spacing: 0.14em; padding: 8px 16px; border-radius: 999px;
  transition: background 0.5s var(--ease), color 0.4s;
}
.hero-nav a:hover { background: rgba(255, 255, 255, 0.72); color: var(--ink); }

.hero-body { position: relative; z-index: 3; padding: clamp(36px, 7vh, 110px) clamp(18px, 4vw, 64px) clamp(90px, 14vh, 170px); }

.glass-panel {
  width: min(100%, 540px); padding: clamp(26px, 3.4vw, 46px); border-radius: 32px;
  background: linear-gradient(155deg, rgba(255, 253, 249, 0.62), rgba(255, 250, 242, 0.38));
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.62); box-shadow: 0 40px 90px -50px rgba(74, 54, 34, 0.4);
  animation: lyGlass 1.4s 0.1s var(--ease) both;
}
.glass-panel h1 { font-weight: 250; font-size: clamp(46px, 6vw, 104px); line-height: 0.98; letter-spacing: -0.02em; }
.glass-panel h1 span { display: block; animation: lyRise 1.2s var(--ease) both; }
.glass-panel h1 span:nth-child(1) { animation-delay: 0.25s; }
.glass-panel h1 span:nth-child(2) { animation-delay: 0.4s; }
.glass-panel h1 span:nth-child(3) { animation-delay: 0.55s; }
.glass-rule {
  width: 72px; height: 1px; background: rgba(43, 36, 29, 0.45);
  margin: clamp(24px, 3vw, 40px) 0 clamp(20px, 2.2vw, 28px); transform-origin: left;
  animation: lyDraw 1.1s 0.8s var(--ease) both;
}
.glass-panel p.lead {
  font-size: clamp(17px, 1.35vw, 21px); line-height: 1.45; max-width: 28ch;
  animation: lyRise 1.2s 0.95s var(--ease) both;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(26px, 3vw, 40px); animation: lyRise 1.2s 1.1s var(--ease) both; }
.tags li {
  font-size: 11px; letter-spacing: 0.2em; color: var(--ink-mute); padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.34); border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ---------- generic section rhythm ---------- */
.section { padding: clamp(80px, 12vw, 180px) clamp(18px, 4vw, 64px); max-width: 1520px; margin-inline: auto; }
.section-lead { font-weight: 250; font-size: clamp(28px, 3.7vw, 58px); line-height: 1.16; letter-spacing: -0.015em; max-width: 26ch; text-wrap: pretty; }
.title-lg { font-weight: 250; font-size: clamp(32px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -0.015em; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(32px, 5vw, 90px); margin-top: clamp(48px, 6vw, 96px); align-items: start; }
.about-text { max-width: 60ch; display: flex; flex-direction: column; gap: 1.1em; }
.about-text .motto { margin-top: 0.5em; color: var(--accent); font-weight: 250; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.2; letter-spacing: -0.01em; }
.facts {
  padding: clamp(18px, 2.4vw, 34px); border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 253, 249, 0.68), rgba(255, 250, 242, 0.34));
  backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 34px 70px -46px rgba(74, 54, 34, 0.35);
}
.facts .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 22px; padding: 18px 0; align-items: baseline; }
.facts .row + .row { border-top: 1px solid var(--glass-line); }
.facts dt { font-size: clamp(26px, 2.5vw, 38px); font-weight: 250; line-height: 1; font-variant-numeric: tabular-nums; }
.facts dd { font-size: 15.5px; line-height: 1.45; color: var(--ink-mute); }

/* ---------- work ---------- */
.work { max-width: 1520px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 64px); }
.work-room { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(28px, 4vw, 80px); padding-block: clamp(50px, 7vw, 110px); }
.work-room + .work-room { border-top: 1px solid var(--glass-line); }
.work-intro { align-self: start; position: sticky; top: 12vh; }
.work-intro h2 { font-weight: 250; font-size: clamp(48px, 6vw, 104px); line-height: 0.95; letter-spacing: -0.025em; }
.work-intro p { margin-top: 20px; max-width: 32ch; color: var(--ink-mute); }
.work-cases { grid-column: span 2; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(34px, 4vw, 70px) clamp(20px, 2.6vw, 44px); }
.work-cases .wide { grid-column: 1 / -1; }
.work-cases .stagger { margin-top: clamp(0px, 6vw, 100px); }
.also-line { grid-column: 1 / -1; font-size: 16.5px; color: var(--ink-mute); }

.case-photo {
  position: relative; overflow: hidden; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 252, 246, 0.85), rgba(226, 209, 186, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.55); box-shadow: 0 40px 80px -54px rgba(74, 54, 34, 0.45);
  transition: transform 1.1s var(--ease), box-shadow 1.1s;
}
.case-photo.ratio-wide { aspect-ratio: 16 / 10; }
.case-photo.ratio-tall { aspect-ratio: 4 / 5; }
.case-photo:hover { transform: translateY(-6px); box-shadow: 0 54px 100px -50px rgba(74, 54, 34, 0.42); }
.case-photo .blik {
  position: absolute; left: 16%; top: -12%; width: 38%; height: 124%;
  background: rgba(255, 252, 244, 0.6); transform: skewX(-24deg); filter: blur(22px);
}
.case-photo .cap { position: absolute; left: 20px; bottom: 16px; font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-mute); }

.case-photo.filling .blik { display: none; }
.case-photo.filling .sweep {
  position: absolute; top: -10%; left: 0; width: 40%; height: 120%;
  background: linear-gradient(100deg, rgba(255, 252, 246, 0), rgba(255, 246, 229, 0.75), rgba(255, 252, 246, 0));
  filter: blur(16px); animation: lyFill 5.5s ease-in-out infinite;
}
.case-photo.filling .cap { display: flex; align-items: center; gap: 6px; }

.dots { display: inline-flex; gap: 3px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: lyDot 1.3s ease-in-out infinite; display: block; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }

.case h3 { font-weight: 400; font-size: clamp(21px, 1.8vw, 27px); line-height: 1.2; margin-top: 20px; }
.case .ctx { font-size: 15px; color: var(--ink-mute); margin-top: 4px; }
.case .desc { margin-top: 10px; max-width: 52ch; font-size: 16.5px; }
.case .desc.filling { color: var(--ink-mute); font-style: italic; display: flex; align-items: center; gap: 7px; }

/* ---------- how / brief ---------- */
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(18px, 2vw, 28px); margin-top: clamp(40px, 5vw, 80px); }
.how-steps li {
  padding: clamp(20px, 2vw, 30px); border-radius: 26px;
  background: linear-gradient(165deg, rgba(255, 253, 249, 0.6), rgba(255, 250, 242, 0.28));
  backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 30px 60px -46px rgba(74, 54, 34, 0.34);
  transition: transform 1s var(--ease), background 1s;
}
.how-steps li:hover { transform: translateY(-5px); background: linear-gradient(165deg, rgba(255, 254, 251, 0.78), rgba(255, 251, 244, 0.42)); }
.how-steps .num { font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }
.how-steps h3 { font-weight: 400; font-size: clamp(22px, 2vw, 30px); margin: 8px 0 10px; }
.how-steps p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

.brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 5vw, 90px); margin-top: clamp(70px, 9vw, 140px); }
.brief h2 { font-weight: 250; font-size: clamp(32px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -0.015em; }
.brief-list { grid-column: span 2; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px clamp(24px, 3vw, 48px); }
.brief-list strong { display: block; font-weight: 400; font-size: 20px; margin-bottom: 6px; }
.brief-list span { font-size: 16px; color: var(--ink-mute); }

/* ---------- clients ---------- */
.clients-title { font-size: 14px; letter-spacing: 0.18em; color: var(--ink-mute); margin-bottom: 26px; }
.clients-list { display: flex; flex-wrap: wrap; gap: 0.2em 0.8em; font-weight: 250; font-size: clamp(30px, 4.4vw, 72px); line-height: 1.18; letter-spacing: -0.02em; }

/* ---------- ideas / products shared card grid ---------- */
.stack-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 5vw, 90px); }
.stack-head.sticky .stack-title { align-self: start; position: sticky; top: 12vh; }
.stack-title h2 { font-weight: 250; font-size: clamp(32px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -0.015em; }
.stack-title p { margin-top: 16px; max-width: 32ch; color: var(--ink-mute); }
.stack-title .ideas-sub { max-width: 30ch; }

.card-grid { grid-column: span 2; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(16px, 2vw, 24px); }
.card-grid.products { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card {
  padding: clamp(20px, 2vw, 28px); border-radius: 24px; background: rgba(255, 253, 249, 0.46);
  backdrop-filter: blur(14px) saturate(1.12); -webkit-backdrop-filter: blur(14px) saturate(1.12);
  border: 1px solid rgba(255, 255, 255, 0.55); transition: transform 1s var(--ease), background 1s;
}
.card:hover { transform: translateY(-4px); background: rgba(255, 254, 251, 0.68); }
.card h3 { font-weight: 400; font-size: clamp(21px, 1.8vw, 27px); }
.card-grid.products h3 { font-size: clamp(20px, 1.7vw, 25px); }
.card .status { font-size: 13.5px; letter-spacing: 0.06em; color: var(--accent); margin-top: 4px; }
.card p.body { margin-top: 12px; font-size: 16.5px; color: var(--ink-soft); }
.card a.deep { border-bottom: 1px solid rgba(168, 130, 90, 0.5); }
.card .filling { display: flex; align-items: center; gap: 7px; font-style: italic; }

.product-groups { grid-column: span 2; min-width: 0; display: flex; flex-direction: column; gap: clamp(36px, 4vw, 64px); }
.product-group .label { font-size: 13px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 16px; }

/* ---------- contact footer ---------- */
.contact {
  position: relative; z-index: 1; color: var(--footer-ink);
  background: linear-gradient(180deg, var(--footer-dark), var(--footer-darker) 60%);
  padding: clamp(90px, 14vw, 210px) clamp(18px, 4vw, 64px) 36px; overflow: hidden;
}
.contact .glow {
  position: absolute; left: -12%; bottom: -34%; width: 80%; height: 94%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(222, 158, 86, 0.26), rgba(222, 158, 86, 0));
  filter: blur(20px); animation: lyDriftA 58s ease-in-out infinite;
}
.contact .ray {
  position: absolute; right: 4%; top: -24%; width: 22%; height: 170%;
  background: linear-gradient(100deg, rgba(240, 192, 132, 0), rgba(240, 192, 132, 0.12), rgba(240, 192, 132, 0));
  filter: blur(34px); transform: skewX(-34deg); animation: lyBeam 44s ease-in-out infinite;
}
.contact-inner { position: relative; z-index: 1; max-width: 1520px; margin-inline: auto; }
.contact h2 { font-weight: 250; font-size: clamp(44px, 7.6vw, 140px); line-height: 1; letter-spacing: -0.025em; max-width: 13ch; }
.contact .sub { margin-top: 24px; font-size: clamp(17px, 1.5vw, 22px); color: rgba(246, 236, 224, 0.74); }
.contact-cards { margin-top: clamp(40px, 6vw, 86px); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, max-content)); gap: 16px clamp(16px, 3vw, 40px); }
.contact-cards .ccard {
  padding: 20px 26px; border-radius: 22px; background: rgba(255, 244, 230, 0.07);
  border: 1px solid rgba(246, 236, 224, 0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background 0.9s var(--ease), border-color 0.9s;
}
.contact-cards .ccard:hover { background: rgba(255, 244, 230, 0.13); border-color: rgba(246, 236, 224, 0.3); }
.contact-cards .ccard span { display: block; font-size: 13px; letter-spacing: 0.1em; color: rgba(246, 236, 224, 0.6); margin-bottom: 8px; }
.contact-cards .ccard a { font-size: clamp(19px, 1.7vw, 25px); color: var(--footer-ink); }
.contact .signature { font-weight: 250; font-size: clamp(34px, 4vw, 66px); line-height: 1; letter-spacing: -0.02em; margin-top: clamp(60px, 8vw, 130px); color: rgba(246, 236, 224, 0.86); }
.contact .legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 120px); padding-top: 20px; border-top: 1px solid rgba(246, 236, 224, 0.14); font-size: 14px; color: rgba(246, 236, 224, 0.5); }

/* ---------- clock ---------- */
.clock {
  position: fixed; z-index: 5; left: clamp(12px, 1.4vw, 26px); bottom: 26px;
  font-size: 11.5px; letter-spacing: 0.08em; writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; color: var(--ink-mute); font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 1.2s ease, color 0.8s ease; pointer-events: none;
}

/* ---------- reveal on scroll ---------- */
[data-reveal] { transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
[data-reveal].is-hidden { opacity: 0; transform: translateY(26px); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .work-intro { position: static; }
  .stack-head.sticky .stack-title { position: static; }
}
@media (max-width: 640px) {
  .hero-photo img { object-position: 50% 12%; }
}
