/* Portfolio cover page: Vdos Websites */

:root {
  --bg: #f1f0ec;
  --navy: #232f8c;
}
body { background: var(--bg); }

/* ---------- Shared bits ---------- */
.caps-h2 { font-size: clamp(30px, 4vw, 58px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 500; text-transform: uppercase; max-width: 18ch; }
.btn-white { --b-bg: #fff; --b-fg: #0b0b0f; }
.btn-white:hover { background: #ececec; }
.btn .ico { font-size: 17px; }
.arrow-circle .ico { font-size: 15px; }

/* ---------- Nav: one frosted white bar ---------- */
.nav { position: fixed; top: max(22px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(calc(var(--maxw) + 40px), 100% - 2 * var(--gutter) - 24px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; border-radius: 16px;
  color: var(--ink); background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.3); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 18px; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: -0.02em; background: var(--navy); color: #fff; }
.nav-links { display: flex; gap: 2px; font-size: 15px; color: var(--ink-2); }
.nav-links a { padding: 8px 14px; border-radius: 10px; transition: background 0.3s, color 0.3s; }
.nav-links a:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); }
.nav-cta { justify-self: end; border-radius: 10px; }

/* ---------- Hero: framed photo, title sitting just above the intro along the bottom ---------- */
.hero { position: relative; margin: 12px; border-radius: 30px; overflow: hidden; isolation: isolate; color: #fff;
  height: max(640px, min(100svh - 24px, 1000px)); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; translate: 0 calc(var(--hp, 0) * 22%); }
@keyframes settle { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 16, 24, 0.42) 0%, rgba(10, 16, 24, 0.08) 38%, rgba(10, 16, 24, 0.05) 60%, rgba(10, 16, 24, 0.45) 100%); }
.hero-inner { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(22px, 3vw, 44px); padding: 128px clamp(20px, 3.4vw, 52px) clamp(16px, 2.4vw, 34px); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; translate: 0 calc(var(--hp, 0) * 45%); }
.hero-intro { max-width: min(540px, 100%); }
.hero-intro p { font-size: clamp(22px, 2.3vw, 34px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; }
.hero-intro .btn { margin-top: 28px; }
.hero-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 15px; line-height: 1.95; font-weight: 500; }
.hero-list li:nth-child(even) { padding-left: 1.6em; }
.hero-title { font-size: clamp(56px, 10.4vw, 214px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 600; white-space: nowrap; margin-left: -0.04em; order: -1; opacity: calc(1 - var(--hp, 0) * 1.8); translate: 0 calc(var(--hp, 0) * -80px); }

/* ---------- About: one statement ---------- */
.intro { padding: clamp(100px, 13vw, 180px) 0 0; text-align: center; }
.statement { margin: 0 auto; max-width: 16ch; font-size: clamp(36px, 5.6vw, 84px); line-height: 1; letter-spacing: -0.025em; font-weight: 500; text-transform: uppercase; }
.fill-word { color: #c9c8c3; transition: color 0.5s var(--ease); }
.fill-word.on { color: var(--ink); }

/* ---------- Live demos ---------- */
.work { padding: clamp(100px, 12vw, 160px) 0 40px; }
.work-head { margin-bottom: clamp(36px, 4vw, 56px); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Demo card: a poster of the site, with its name and a pill button along the bottom */
.card { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 5 / 4; border-radius: 28px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; }
/* Cover: a screenshot of the demo itself, phone / tablet / desktop picked by <picture> */
.card-cover { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #e4e2dc; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: top; transition: transform 1.2s var(--ease); }
.card:not(.in) .card-cover img { transform: scale(1.12); }
/* Soft blur and shade along the bottom so the card text reads over the screenshot's own text */
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000 72%); mask-image: linear-gradient(180deg, transparent 40%, #000 72%); }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.45) 62%, rgba(0, 0, 0, 0.78) 100%); }
.card:hover .card-cover img { transform: scale(1.04); }
/* Light posters (Kinetic): dark text, no dark shade */
.card-light { color: var(--ink); }
.card-light::before, .card-light::after { display: none; }
.card-light .card-btn { background: var(--ink); color: #fff; }
.card-light .arrow-circle { background: #fff; color: var(--ink); }
.card-body { padding: 0 clamp(22px, 2.6vw, 34px) clamp(22px, 2.6vw, 30px); }
.card h3 { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }
.card-btn { margin-top: 20px; display: inline-flex; align-items: center; gap: 16px; padding: 6px 6px 6px 22px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 500; }
.card-btn .arrow-circle { width: 40px; height: 40px; }
.card:hover .arrow-circle { transform: rotate(45deg); }

/* ---------- Process: numbered rows ---------- */
.process { padding: clamp(90px, 11vw, 150px) 0 20px; }
.process-head { text-align: center; margin-bottom: clamp(36px, 4vw, 56px); }
.process-head .caps-h2 { margin-inline: auto; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(0, 0, 0, 0.12); }
.row { display: grid; grid-template-columns: 70px 1.1fr 1fr; align-items: center; gap: 28px; padding: 34px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.row-num { font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-name { font-size: clamp(24px, 2.8vw, 40px); line-height: 1.05; font-weight: 500; letter-spacing: -0.01em; text-transform: uppercase; color: #a3a3a6; transition: color 0.4s, translate 0.6s var(--ease); }
.row p { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; max-width: 38ch; }
.row:hover .row-name { color: var(--ink); translate: 14px 0; }
@media (hover: none) { .row-name { color: var(--ink); } }

/* ---------- Contact ---------- */
.contact { padding: clamp(90px, 11vw, 150px) 0 30px; }
.contact-panel { position: relative; overflow: hidden; isolation: isolate; border-radius: 18px; padding: clamp(70px, 10vw, 150px) 24px; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; }
.contact-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease), filter 1.2s var(--ease); }
.contact-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 16, 24, 0.38); transition: background 0.8s var(--ease); }
.contact-panel.is-open::after { background: rgba(10, 16, 24, 0.76); }
.contact-panel.is-open > img { transform: scale(1.05); filter: blur(2px); }
.contact-panel .caps-h2 { margin-inline: auto; max-width: 14ch; font-size: clamp(36px, 5.4vw, 80px); }
.brief-intro p { margin: 20px auto 34px; max-width: 40ch; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, 0.88); }

/* Project brief (contact.js): one step at a time inside the tinted panel */
.brief { width: min(640px, 100%); }
.brief-step { border: 0; padding: 0; margin: 0; min-width: 0; text-align: left; animation: brief-in 0.7s var(--ease); }
.brief-step[hidden] { display: none; }
.brief-intro, .brief-done { display: flex; flex-direction: column; align-items: center; text-align: center; }
@keyframes brief-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
.brief-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.brief-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.brief-count { font-size: 13px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }
.brief-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 18px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); transition: background 0.3s; }
.brief-close:hover { background: rgba(255, 255, 255, 0.22); }
.brief-title { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; margin-bottom: 26px; }
.brief-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.brief-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.brief-field input, .brief-field textarea { font-size: 17px; color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 12px; padding: 14px 16px; outline: none; resize: vertical; transition: border-color 0.3s, background 0.3s; }
.brief-field textarea { font-family: inherit; line-height: 1.5; min-height: 150px; }
.brief-field input:focus, .brief-field textarea:focus { border-color: #fff; background: rgba(255, 255, 255, 0.16); }
.brief-label { margin: 24px 0 12px; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.brief-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.brief-pill input { position: absolute; opacity: 0; pointer-events: none; }
.brief-pill span { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; border: 1px solid rgba(255, 255, 255, 0.35); cursor: pointer; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.brief-pill:hover span { background: rgba(255, 255, 255, 0.12); }
.brief-pill input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.brief-pill input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.brief-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 30px; }
.brief .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.brief-back { --b-bg: rgba(255, 255, 255, 0.12); --b-fg: #fff; border: 1px solid rgba(255, 255, 255, 0.24); }
.brief-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; margin: 0; padding: 22px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.brief-summary dt { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.brief-summary dd { margin: 6px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.brief-summary .wide { grid-column: 1 / -1; }
.brief-summary .wide dd { white-space: pre-wrap; max-height: 180px; overflow: auto; color: rgba(255, 255, 255, 0.88); }
.brief-error { margin-top: 16px; font-size: 15px; color: #ffd2c4; }
.brief-error a { text-decoration: underline; }
.brief:has(.brief-call:not([hidden])) { width: min(860px, 100%); }
.brief-note { margin-top: -12px; color: rgba(255, 255, 255, 0.82); font-size: 16px; }
.brief-tip { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, 0.82); }
.brief-tip .ico { flex: none; font-size: 18px; color: #fff; }
.brief-cal { margin-top: 22px; height: min(680px, 72svh); border-radius: 14px; overflow: hidden; background: #fff; }
.brief-cal iframe { display: block; width: 100%; height: 100%; border: 0; }
.brief-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px; font-size: 28px; background: #fff; color: var(--ink); }
.brief-done p { margin: 0 0 28px; max-width: 40ch; color: rgba(255, 255, 255, 0.88); }

/* ---------- Footer ---------- */
.end { padding: clamp(60px, 8vw, 110px) 0 calc(40px + var(--safe-b)); }
/* Footer: the photo split into rounded tiles 3px apart, with the name and year set into gaps in the grid.
   Font sizes follow the grid width (cqw) so the text always fits its gap. */
.end-grid { container-type: inline-size; display: grid; grid-template-columns: repeat(var(--cols, 8), 1fr); grid-template-rows: repeat(var(--rows, 3), auto);
  width: min(100%, calc((100svh - 240px) * var(--cols, 8) / var(--rows, 3))); margin-inline: auto; } /* the grid always fits on screen */
.end-grid > img { grid-area: 1 / 1 / -1 / -1; width: 100%; aspect-ratio: 8 / 3; object-fit: cover; border-radius: 22px; }
.end-grid.is-tiled > img { display: none; }
.end-grid i { aspect-ratio: 1; background: var(--tiles-img) #d9d6cf; background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  clip-path: inset(50% round 18%); transition: clip-path 0.8s var(--ease) calc(var(--k) * 700ms + 200ms); }
.end-grid.in i { clip-path: inset(1.5px round 18%); }
.end-big { position: relative; z-index: 1; line-height: 0.95; letter-spacing: -0.045em; font-weight: 600; transition: translate 1.4s var(--ease); }
.end-name { grid-area: 1 / 6 / 3 / 9; place-self: center end; text-align: right; font-size: 8.2cqw; padding-right: 1cqw; }
.end-year { grid-area: 3 / 1 / 4 / 3; align-self: center; font-size: 5.6cqw; padding-left: 1.6cqw; }
.end-grid:not(.in) .end-name { translate: 70px 0; }
.end-grid:not(.in) .end-year { translate: -70px 0; }
.end .credits { margin-top: clamp(40px, 5vw, 70px); padding-top: 22px; border-top: 1px solid rgba(0, 0, 0, 0.1); display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: flex; justify-content: space-between; }
  .nav-links { display: none; }
  .row { grid-template-columns: 50px 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-top { flex-direction: column; align-items: flex-start; gap: 22px; }
  .hero-list { display: none; }
  .hero-title { white-space: normal; font-size: 17.5vw; line-height: 0.88; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brief-fields, .brief-summary { grid-template-columns: 1fr; }
  .brief-actions .btn { flex: 1; }
  .hero { margin: 8px; border-radius: 24px; height: max(600px, calc(100svh - 16px)); }
  .hero-inner { padding: 104px 20px 22px; }
  .hero-title { text-align: center; margin-left: 0; }
  .nav { width: calc(100% - 2 * var(--gutter)); top: max(18px, env(safe-area-inset-top)); padding-left: 10px; }
  .card { aspect-ratio: 4 / 5; border-radius: 24px; }
  .row { grid-template-columns: 38px 1fr; gap: 6px 12px; padding: 20px 0; }
  .row p { grid-column: 2; }
}
@media (max-width: 380px) {
  .logo { font-size: 16px; gap: 8px; }
  .nav-cta { padding: 0 12px; }
}
