/* Smile Mask Technology: one-page site. Dark, restrained, real product screenshots. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("fonts/fragment-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0c0e;
  --raise: #111316;
  --raise-2: #16181c;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #ededef;
  --muted: #9b9ea7;
  --faint: #80838c;
  --live: #4ade80;
  --dev: #f5b843;
  --partner: #84acff;

  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --control: 999px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(96px, 12vw, 160px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  scrollbar-color: #2a2d33 var(--bg);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 102%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--text);
}

::selection { background: rgb(132 172 255 / 0.32); color: #fff; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--control);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--control);
  background: var(--text);
  color: var(--bg);
  font-weight: 560;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: rgb(255 255 255 / 0.06); border-color: rgb(255 255 255 / 0.26); }
.btn--small { height: 36px; padding: 0 16px; font-size: 0.9375rem; }

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(11 12 14 / 0.72);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  justify-self: start;
  font-weight: 640;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 160ms ease;
}
.nav__links a:hover { color: var(--text); }
.nav__actions { justify-self: end; }

/* Hero */

.hero {
  position: relative;
  padding: clamp(48px, 6.5vw, 88px) 0 clamp(40px, 4.5vw, 56px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  background: radial-gradient(50% 50% at 30% 30%, rgb(132 172 255 / 0.10), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero__title span { display: block; }
.hero__title {
  font-size: clamp(2.5rem, 1.2rem + 4.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 620;
  font-stretch: 110%;
}
.hero__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px 16px;
  align-items: end;
  margin-top: 28px;
}
.hero__lede {
  grid-column: 1 / 7;
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
}
.hero__actions { grid-column: 7 / 13; padding-left: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Section heads */

/* Section heads sit on the grid below them: the side column starts where the second card's (or third field's) text starts. */
.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px 16px;
  align-items: end;
  margin-bottom: 20px;
}
.section-head h2 { grid-column: 1 / 7; }
.section-head__side { grid-column: 7 / 13; padding-left: 28px; }
.section-head--fields { column-gap: 0; }
.section-head--fields h2 { grid-column: 1 / 7; }
.section-head--fields .section-head__side { grid-column: 7 / 13; padding-left: 28px; }
.section-head h2 {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-stretch: 108%;
}
.section-head__side { display: flex; flex-direction: column; gap: 14px; }
.section-head p { color: var(--muted); }

/* Portfolio */

.portfolio { padding-top: 32px; padding-bottom: var(--section); }


/* Two equal columns. Each card spans four subgrid rows (head, text, link, screenshot),
   so the screenshots in a row start on the same line whatever the text length. */
.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 0;
}
.card {
  position: relative;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-content: start;
  margin-bottom: 16px;
  min-width: 0;
  padding: 28px 28px 0;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 200ms ease;
}
.card:hover { border-color: var(--line-strong); }

.card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.card h3 { font-size: 1.5rem; letter-spacing: -0.02em; font-stretch: 106%; }
.card__text { margin-top: 12px; color: var(--muted); max-width: 56ch; align-self: start; }
.card__text a { color: var(--text); }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  align-self: start;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color 160ms ease;
}
.card__link:hover { border-color: var(--text); }
.card__link .icon { color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--control);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status--live::before { background: var(--live); box-shadow: 0 0 0 3px rgb(74 222 128 / 0.14); }
.status--dev::before { background: var(--dev); box-shadow: 0 0 0 3px rgb(245 184 67 / 0.14); }
.status--partner::before { background: var(--partner); box-shadow: 0 0 0 3px rgb(132 172 255 / 0.14); }

/* Screenshot frames: real pages, framed as a browser, bleeding off the card's foot */

.shot {
  margin: 28px 0 0;
  align-self: end;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--raise-2);
  overflow: hidden;
  box-shadow: 0 -12px 40px -12px rgb(0 0 0 / 0.6), 0 24px 48px -16px rgb(0 0 0 / 0.5);
  transform-origin: 50% 100%;
}
.shot__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  flex: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}
.shot__tag {
  margin-left: 4px;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control);
  color: var(--muted);
}

/* Expertise */

.expertise { padding-bottom: var(--section); }
.fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 28px 0;
}
.field + .field { padding-left: 28px; border-left: 1px solid var(--line); }
.field dt {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-stretch: 104%;
}
.field dd { margin: 0; color: var(--muted); font-size: 1rem; }
.field dd.field__proof {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--faint);
}
.field__proof a { color: var(--text); }

/* Contact */

.contact {
  padding: var(--section) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(60% 80% at 80% 100%, rgb(132 172 255 / 0.07), transparent 70%);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
}
.contact h2 {
  font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-stretch: 110%;
}
.contact__lede { margin-top: 20px; color: var(--muted); max-width: 30rem; font-size: 1.125rem; }
.contact__details { display: flex; flex-direction: column; gap: 24px; }
.contact__email {
  align-self: flex-start;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.25rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color 160ms ease;
}
.contact__email:hover { border-color: var(--text); }
address { font-style: normal; color: var(--muted); line-height: 1.7; }

/* Footer */

.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  color: var(--faint);
  font-size: 0.875rem;
}

/* The one authored motion: screenshots settle from a slight tilt to flat as they scroll in. */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shot {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    /* The first screenshot is in view on load: show it settled rather than mid-tilt. */
    .card:nth-child(-n + 2) .shot { animation: none; }
    @keyframes settle {
      from { transform: perspective(1400px) rotateX(9deg) translateY(28px) scale(0.98); filter: brightness(0.7); }
      to { transform: none; filter: none; }
    }
  }
}

/* Responsive */

@media (max-width: 1080px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field:nth-child(3) { padding-left: 0; border-left: 0; }
  .field:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .hero__body { grid-template-columns: 1fr; }
  .hero__lede,
  .hero__actions { grid-column: 1 / -1; padding-left: 0; }
  .section-head,
  .section-head--fields { grid-template-columns: 1fr; }
  .section-head h2,
  .section-head__side,
  .section-head--fields h2,
  .section-head--fields .section-head__side { grid-column: 1 / -1; padding-left: 0; }
  .contact__grid { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 720px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .card { padding: 22px 22px 0; }
  .shot { margin-top: 22px; }
  .fields { grid-template-columns: 1fr; }
  .field,
  .field + .field { padding: 24px 0; border-left: 0; }
  .field + .field { border-top: 1px solid var(--line); }
  .footer__inner { flex-direction: column; }
}

@media (max-width: 400px) {
  .brand { font-size: 0.9375rem; }
  .btn--small { padding: 0 12px; }
}
