/* gnoorzahi.com
   Neutral palette: graphite (#1c1c1a) at the start and the end of the page, white in between.
   One typeface, Mona Sans: wide and bold for headlines, normal width for text.
   Mobile first. Breakpoints: 720px (tablet), 960px (12-column grid). */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/MonaSans-var.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #1c1c1a;
  --on-brand: #ffffff;
  --on-brand-2: rgb(255 255 255 / .7);
  --brand-rule: rgb(255 255 255 / .16);

  --paper: #ffffff;
  --ink: #131313;
  --ink-2: #5c5c59;
  --rule: #e4e4e1;
  --wash: #f3f3f1;
  --bar: #ebebe8;
  --frame: rgb(0 0 0 / .09);
  --on-ink: #ffffff;
  --accent: var(--ink);

  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 118%;
  --gutter: 20px;
  --max: 1240px;
  --head-h: 60px;
  --overlap: 96px;
  --gap: 24px;
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f0f0f;
    --ink: #ececea;
    --ink-2: #a3a39f;
    --rule: #272726;
    --wash: #171716;
    --bar: #1d1d1c;
    --frame: rgb(255 255 255 / .09);
    --on-ink: #0f0f0f;
    --brand: #1e1e1c;
  }
}

@media (min-width: 720px) { :root { --gutter: 32px; --overlap: 140px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; --overlap: 180px; } }

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hyphens: manual;
}

@media (min-width: 960px) { body { font-size: 1.125rem; } }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--brand); color: var(--on-brand); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-ink);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn .icon { fill: currentColor; stroke: none; }

/* ---------- type ---------- */

.link {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity .2s, border-color .2s, background-color .2s;
}
.btn:hover { opacity: .86; }
.btn:active { opacity: .74; }

.btn--line {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 24%, transparent);
}
.btn--line:hover { opacity: 1; border-color: var(--ink); }

.btn--white { background: var(--on-brand); color: var(--brand); border-color: var(--on-brand); }
.btn--glass { background: transparent; color: var(--on-brand); border-color: rgb(255 255 255 / .5); }
.btn--glass:hover { opacity: 1; border-color: var(--on-brand); background: rgb(255 255 255 / .08); }

.wa-off [data-wa] { display: none !important; }

/* ---------- top bar ----------
   The bar is dark with white text while a dark section (hero or contact) lies
   fully under it, and white everywhere else. Each dark section has a view
   timeline whose inset shrinks the visible area to the bar's own 60px band.
   For the hero the band is --overlap taller, so the bar turns white when the
   client sites (which reach up into the hero) meet it.
   Browsers without scroll timelines show the white bar all the time. */

.top {
  --t-fg: var(--ink);
  --t-fg-2: var(--ink-2);
  --t-bg: var(--paper);
  --t-line: var(--rule);
  --t-mark-bg: var(--ink);
  --t-mark-fg: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--t-bg);
  color: var(--t-fg);
  border-bottom: 1px solid transparent;
}
.top.is-scrolled { border-bottom-color: var(--t-line); }

@supports (animation-timeline: view()) and (timeline-scope: --hero) {
  body { timeline-scope: --hero, --end; }
  .hero { view-timeline: --hero block; }
  .end { view-timeline: --end block; }
  .hero { view-timeline-inset: 0 calc(100% - var(--head-h) - var(--overlap)); }
  .end { view-timeline-inset: 0 calc(100% - var(--head-h)); }
  .top--hero {
    animation: top-on-dark linear none, top-on-dark linear none;
    animation-timeline: --hero, --end;
    animation-range: cover 0% contain 100%, contain 0% contain 100%;
  }
}

@keyframes top-on-dark {
  from, to {
    --t-fg: var(--on-brand);
    --t-fg-2: var(--on-brand-2);
    --t-bg: var(--brand);
    --t-line: transparent;
    --t-mark-bg: var(--on-brand);
    --t-mark-fg: var(--brand);
  }
}

.top__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--head-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding-block: 8px;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--t-mark-bg);
  color: var(--t-mark-fg);
  font-size: .75rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -.03em;
  line-height: 1;
}
.brand__name {
  font-size: 1rem;
  font-weight: 680;
  font-stretch: 108%;
  letter-spacing: -.018em;
}

.top__nav { display: none; }
.top__nav a {
  padding-block: 12px;
  color: var(--t-fg-2);
  font-size: .9375rem;
  text-decoration: none;
  transition: color .2s;
}
.top__nav a:hover { color: var(--t-fg); }

.top__back { padding-block: 12px; font-size: .9375rem; }

.lang {
  display: flex;
  align-items: center;
  margin-right: -6px;
  color: var(--t-fg-2);
  font-size: .875rem;
}
.lang span { opacity: .45; }
.lang button {
  min-width: 32px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--t-fg-2);
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
}
.lang button:hover { color: var(--t-fg); }
.lang button[aria-pressed="true"] { color: var(--t-fg); font-weight: 700; }

@media (min-width: 880px) {
  .top__nav { display: flex; gap: 28px; }
  .lang { margin-left: 8px; }
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  min-height: max(540px, 88svh);
  margin-top: calc(-1 * var(--head-h));
  padding-top: var(--head-h);
  background: var(--brand);
  color: var(--on-brand);
}

.hero__in {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 48px calc(var(--overlap) + 40px);
}

.hero__title {
  font-size: clamp(3.4rem, .8rem + 11.4vw, 9.5rem);
  font-weight: 720;
  font-stretch: var(--wide);
  line-height: .94;
  letter-spacing: -.042em;
  text-wrap: balance;
}

.hero__foot {
  display: grid;
  gap: 16px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--brand-rule);
  font-size: 1rem;
  line-height: 1.4;
}

.hero__who { display: flex; align-items: center; gap: 12px; }
.hero__who img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgb(255 255 255 / .3);
}
.hero__who strong { display: block; font-weight: 650; }
.hero__who strong + span,
.hero__lead { color: var(--on-brand-2); }
.hero__lead { text-wrap: pretty; }

@media (min-width: 960px) {
  .hero { min-height: clamp(600px, 92svh, 980px); }
  .hero__in { padding-bottom: calc(var(--overlap) + 56px); }
  .hero__foot {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: center;
    margin-top: 64px;
    font-size: 1.0625rem;
  }
  .hero__who { grid-column: 1 / span 5; }
  .hero__lead { grid-column: 7 / -1; }
}

/* ---------- work ----------
   No section heading: the two client sites sit half on the dark hero, half on
   white, so the first screen already shows real work. */

.works { position: relative; margin-top: calc(-1 * var(--overlap)); }
.works__grid { display: grid; gap: 56px; }

@media (min-width: 720px) {
  .works__grid { grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
}

.plate {
  display: block;
  overflow: clip;
  border-radius: var(--radius);
  background: var(--wash);
  box-shadow: 0 0 0 1px var(--frame), 0 24px 48px -24px rgb(0 0 0 / .35);
  text-decoration: none;
}

.plate__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding-inline: 12px;
  background: var(--bar);
  border-bottom: 1px solid var(--frame);
}

.plate__url {
  min-width: min(14rem, 60%);
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: .75rem;
  line-height: 1.3;
  text-align: center;
  letter-spacing: .01em;
}

/* The screenshots are 1280 × 3200 (2.5 : 1).
   --pan moves the image up until its bottom edge meets the frame:
   a 4:5 frame shows 50 % of the image. */
.plate__view {
  --pan: -50%;
  display: block;
  aspect-ratio: 4 / 5;
  min-height: 0; /* without this the box grows to the image height */
  overflow: clip;
  view-timeline: --plate block;
}
.plate__view img { width: 100%; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .plate__view img {
      animation: pan linear both;
      animation-timeline: --plate;
      animation-range: cover 12% cover 88%;
    }
  }
}

@keyframes pan { to { translate: 0 var(--pan); } }

.work__text {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}
.work__name {
  font-size: clamp(1.375rem, 1.15rem + .7vw, 1.75rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -.028em;
}
.work__meta { color: var(--ink-2); font-size: 1rem; }
.work__url { justify-self: start; margin-top: 6px; padding-block: 4px; font-size: .9375rem; }

/* ---------- about ----------
   One short text instead of separate service and process lists. */

.about { padding-block: 96px 104px; }
.about__in { display: grid; gap: 40px; }
.about__in > * { min-width: 0; }

.about__text p {
  max-width: 34em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.about__text .about__first {
  max-width: 22em;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.375rem);
  font-weight: 560;
  font-stretch: 104%;
  line-height: 1.22;
  letter-spacing: -.022em;
}

.about__photo {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--wash);
  aspect-ratio: 4 / 5;
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 720px) {
  .about__in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .about__text { grid-column: 1 / span 7; }
  .about__photo { grid-column: 9 / -1; }
}
@media (min-width: 960px) {
  .about { padding-block: 152px 168px; }
}

/* ---------- contact (dark end of the page) ---------- */

/* Tall enough that, scrolled to the bottom, the dark section fills the screen under the bar.
   --foot-h is a slight underestimate of the footer height on purpose. */
.end {
  --foot-h: 7rem;
  display: flex;
  min-height: calc(100svh - var(--foot-h));
  background: var(--brand);
  color: var(--on-brand);
}
.end :focus-visible,
.hero :focus-visible,
.foot--brand :focus-visible { outline-color: var(--on-brand); }

.end__in {
  display: flex;
  flex-direction: column;
  padding-block: 104px 56px;
}

.end__title {
  font-size: clamp(3.1rem, .8rem + 10vw, 8.75rem);
  font-weight: 720;
  font-stretch: var(--wide);
  line-height: .94;
  letter-spacing: -.042em;
  text-wrap: balance;
}

.end__left { margin-top: 28px; }
.end__lead { color: var(--on-brand-2); font-size: 1.125rem; }
.end__left .actions { margin-top: 24px; }

.facts { font-size: .9375rem; }
.facts > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  column-gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--brand-rule);
}
.facts dt { color: var(--on-brand-2); }
.facts dd { overflow-wrap: anywhere; }
.end__facts { margin-top: auto; padding-top: 48px; }

@media (max-width: 400px) {
  .facts > div { grid-template-columns: 1fr; row-gap: 2px; }
}

.facts__mail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }

.copy {
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-brand-2);
  font-size: .875rem;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
.copy:hover,
.copy[data-done] { color: var(--on-brand); }
.copy[data-done] { text-decoration: none; }

@media (min-width: 960px) {
  .end { --foot-h: 4rem; }
  .end__in {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    column-gap: var(--gap);
    padding-block: 120px 72px;
  }
  .end__title { grid-column: 1 / -1; }
  .end__left { grid-column: 1 / span 6; align-self: end; margin-top: 56px; }
  .end__facts { grid-column: 8 / -1; align-self: end; margin-top: 0; padding-top: 0; }
  .end__lead { font-size: 1.25rem; }
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  color: var(--ink-2);
  font-size: .875rem;
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { padding-block: 8px; }
.foot nav a:hover,
.foot nav a[aria-current] { color: var(--ink); }

.foot--brand {
  padding-top: 0;
  border-top: 0;
  background: var(--brand);
  color: var(--on-brand-2);
}
.foot--brand .foot__in { position: relative; padding-top: 18px; }
.foot--brand .foot__in::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: var(--gutter);
  height: 1px;
  background: var(--brand-rule);
}
.foot--brand nav a:hover { color: var(--on-brand); }

/* ---------- WhatsApp sheet ---------- */

.sheet {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 24px);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--frame), 0 -12px 40px rgb(0 0 0 / .14);
}
.sheet::backdrop { background: rgb(0 0 0 / .5); }
.sheet[open] { animation: sheet-up .32s var(--ease); }

.sheet__body {
  display: grid;
  gap: 18px;
  padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__head h2 {
  font-size: 1.25rem;
  font-weight: 680;
  font-stretch: 108%;
  letter-spacing: -.018em;
  outline: 0;
}
.sheet__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.sheet__close:hover { background: var(--wash); }

.sheet__step { display: grid; gap: 18px; }
.sheet__step > p { color: var(--ink-2); font-size: 1rem; text-wrap: pretty; }
.sheet__actions { display: grid; gap: 10px; }
.sheet .btn { min-height: 50px; }
.sheet__fine { font-size: .875rem; }
.sheet__key { font-size: .9375rem; }

.sheet__status { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.sheet__status[data-state="error"] { color: #c62f1f; }
.sheet__widget:empty { display: none; }

.spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@media (prefers-color-scheme: dark) {
  .sheet__status[data-state="error"] { color: #ff8a7a; }
}

@media (min-width: 720px) {
  .sheet { max-width: 460px; margin: auto; border-radius: 16px; }
  .sheet[open] { animation-name: sheet-in; }
  .sheet__body { padding: 20px 24px 24px; }
  .sheet__actions { grid-template-columns: 1fr 1fr; }
  .sheet__actions > :only-child { grid-column: 1 / -1; }
}

@keyframes sheet-up { from { translate: 0 100%; } }
@keyframes sheet-in { from { opacity: 0; scale: .97; } }
@keyframes spin { to { rotate: 1turn; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open], .spinner { animation-duration: .01ms; }
}

/* ---------- legal pages and 404 ---------- */

.legal { padding-block: 40px 96px; }
.legal__body { max-width: 40rem; }
.legal__body h1 {
  margin-bottom: 32px;
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);
  font-weight: 720;
  font-stretch: var(--wide);
  line-height: .98;
  letter-spacing: -.04em;
}
.legal__body section + section { margin-top: 32px; }
.legal__body h2 { margin-bottom: 8px; font-size: 1.125rem; font-weight: 650; font-stretch: 106%; letter-spacing: -.012em; }
.legal__body p,
.legal__body li { color: var(--ink-2); }
.legal__body p + p { margin-top: 12px; }
.legal__body ul { margin-top: 8px; padding-left: 1.1em; list-style: disc; }
.legal__body a:not(.btn) {
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.legal__meta { margin-top: 40px; font-size: .875rem; color: var(--ink-2); }
.legal__body .actions { margin-top: 28px; }

body:has(> .legal) { display: flex; flex-direction: column; min-height: 100dvh; }
body:has(> .legal) > .legal { flex: 1; }

@media (min-width: 960px) { .legal { padding-block: 72px 136px; } }
