/* Quinta do Tapadinho, built from Figma frame "Tapadinho Homepage v2" (412:21) */

:root {
  --ink-900: #262737;
  --ink-800: #323346;
  --ink-600: #4a4b65;
  --ink-500: #6e6f82;
  --ink-300: #999aa8;
  --line: #d6d7e0;
  --surface-muted: #f1f1f5;
  --on-dark-muted: #dddeea;
  --accent: #e6ae65;
  --accent-border: #895b1f;
  --mail-red: #b8322a;
  --mail-cream: #f8f2e7;

  --font-display: "Geom", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow-raised: 0 1px 2px rgba(17, 19, 65, 0.18), 0 5px 7px rgba(17, 19, 65, 0.2);
  --shadow-text: 0 5px 7px rgba(17, 19, 65, 0.2), 0 1px 2px rgba(17, 19, 65, 0.18);
  --inset-primary: inset 0 3px 4px #606188, inset 0 -1px 5px rgba(17, 19, 65, 0.25);

  --gutter: 24px;

  /* Slight overshoot, so hovers and releases feel springy */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  position: relative;
  font-family: var(--font-body);
  color: var(--ink-900);
  background:
    linear-gradient(180deg, rgba(74, 75, 101, 0.14) 0, rgba(255, 255, 255, 0.14) 194px) no-repeat,
    #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.top-highlight {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #fff;
  z-index: 2;
}

/* ---------- Shader backgrounds (see shaders.js) ---------- */

.header, main, .footer { position: relative; z-index: 1; }

.shader-bg {
  position: absolute;
  left: 0;
  width: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.shader-bg.is-ready { opacity: 1; }

/* Starts halfway down the h1 (see shaders.js) and fades in from there */
.shader-bg--hero {
  top: var(--hero-top, 0px);
  height: calc(var(--hero-bottom, 0px) - var(--hero-top, 0px));
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
}

.shader-bg--work { inset: 0; height: 100%; z-index: 0; }

/* A light touch at the top of the contact section, full-bleed past the container */
.contact { position: relative; }
.contact > :not(.shader-bg) { position: relative; z-index: 1; }
.shader-bg--contact {
  top: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 340px;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.shader-bg--contact.is-ready { opacity: 0.75; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */

.header {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-top: 38px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: block; }
.logo img { width: 164px; height: auto; }

.nav {
  display: flex;
  gap: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 37px;
}
.nav a {
  position: relative;
  display: inline-block;
  color: var(--ink-500);
  transition: color .2s ease, transform .3s var(--spring);
}
/* Underline that grows out from the middle */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .35s var(--spring);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a:hover { transform: translateY(-1px); }
.nav a:hover::after { transform: scaleX(1); }
.nav a:active { transform: translateY(1px); transition-duration: .08s; }

/* ---------- Compact sticky bar ---------- */

.stickybar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(214, 215, 224, 0.8);
  box-shadow: 0 6px 18px rgba(17, 19, 65, 0.06);
  transform: translateY(-100%);
  transition: transform .4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .4s ease;
}
.stickybar.is-visible { transform: translateY(0); }
.stickybar:not(.is-visible) { box-shadow: none; }

.stickybar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo--compact img { width: 104px; }
.nav--compact { gap: 36px; font-size: 16px; }
.social--compact { gap: 28px; }
.social--compact img { width: 21px; height: auto; }

/* Active section: tan text, and in the compact bar an underline too */
.nav--compact a[aria-current="page"]::after { transform: scaleX(1); }

/* Anchor jumps land below the compact bar */
#apps, #contact { scroll-margin-top: 64px; }

.social { display: flex; align-items: center; gap: 41px; }
.social a { display: block; transition: transform .4s var(--spring), opacity .2s ease; }
.social a:nth-child(2n):hover { transform: translateY(-3px) rotate(6deg) scale(1.1); }
.social a:nth-child(2n + 1):hover { transform: translateY(-3px) rotate(-6deg) scale(1.1); }
.social a:active { transform: scale(0.88); opacity: .8; transition-duration: .08s; }

.divider { width: 100%; height: 2px; }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
  border: 1px solid #000;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform .35s var(--spring),
    box-shadow .35s var(--spring),
    filter .2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  transition: box-shadow .2s ease;
}
.btn span { display: inline-block; transition: transform .35s var(--spring); }

/* Hover: the button lifts and its shadow spreads */
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* Press: it sinks, the outer shadow tightens and the bevel flips inward */
.btn:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.97);
  transition-duration: .08s;
}
.btn:active span { transform: translateY(1px); transition-duration: .08s; }

.btn--primary {
  background: var(--ink-600);
  color: #fff;
  box-shadow: var(--shadow-raised);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.btn--primary::after { box-shadow: var(--inset-primary); }
.btn--primary:hover { box-shadow: 0 2px 3px rgba(17, 19, 65, 0.2), 0 10px 18px rgba(17, 19, 65, 0.24); }
.btn--primary:active { box-shadow: 0 1px 1px rgba(17, 19, 65, 0.3); }
.btn--primary:active::after { box-shadow: inset 0 2px 6px rgba(17, 19, 65, 0.5), inset 0 -1px 2px #606188; }

.btn--accent {
  background: var(--accent);
  border-color: var(--accent-border);
  box-shadow: 0 1px 2px rgba(17, 19, 65, 0.32), 0 5px 7px rgba(17, 19, 65, 0.3);
}
.btn--accent::after { box-shadow: inset 0 2px 4px #efbb77, inset 0 -1px 5px rgba(17, 19, 65, 0.25); }
.btn--accent:hover { box-shadow: 0 2px 3px rgba(17, 19, 65, 0.34), 0 12px 20px rgba(17, 19, 65, 0.36); }
.btn--accent:active { box-shadow: 0 1px 1px rgba(17, 19, 65, 0.4); }
.btn--accent:active::after { box-shadow: inset 0 2px 6px rgba(93, 72, 46, 0.55), inset 0 -1px 2px #efbb77; }

/* "Coming soon" state: looks like the button, but isn't clickable */
.btn--soon {
  gap: 10px;
  cursor: default;
}
.btn--soon:hover,
.btn--soon:active { transform: none; filter: none; }
.btn--accent.btn--soon:hover,
.btn--accent.btn--soon:active { box-shadow: 0 1px 2px rgba(17, 19, 65, 0.32), 0 5px 7px rgba(17, 19, 65, 0.3); }
.btn--accent.btn--soon:active::after { box-shadow: inset 0 2px 4px #efbb77, inset 0 -1px 5px rgba(17, 19, 65, 0.25); }
.btn--soon:active span { transform: none; }

.soon-tag {
  padding: 3px 7px 2px;
  border-radius: 999px;
  background: var(--ink-600);
  color: #fff;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Compact button for the header and sticky bar */
.btn--small { padding: 9px 18px; font-size: 15px; }

/* Nav + "Get in touch" on the right of the header and sticky bar */
.topbar-end { display: flex; align-items: center; gap: 40px; }
.stickybar .topbar-end { gap: 32px; }
.btn--accent span {
  background:
    linear-gradient(180deg, rgba(230, 174, 101, 0.4) 21.231%, rgba(128, 97, 56, 0.4) 66.005%),
    #5d482e;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 #ffc983);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 77px;
  padding-bottom: 78px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 60px;
  line-height: 53px;
  color: var(--ink-900);
}

.lead {
  max-width: 604px;
  font-weight: 500;
  font-size: 22px;
  line-height: 37px;
  color: var(--ink-500);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 14px;
  border: 1px solid rgba(214, 215, 224, 0.9);
  border-radius: 999px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-500);
}

/* ---------- Currently working on ---------- */

.work {
  position: relative;
  height: 632px;
  padding-top: 69px;
  background:
    linear-gradient(180deg, #303041 0%, rgba(255, 255, 255, 0) 100%),
    var(--ink-600);
}
/* Top shading over the shader, then the bevel highlight on top of everything */
.work::before,
.work::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.work::before {
  z-index: 1;
  background: linear-gradient(180deg, rgba(48, 48, 65, 0.4) 0%, rgba(48, 48, 65, 0) 45%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.work:has(.shader-bg.is-ready)::before { opacity: 1; }
.work::after { z-index: 3; box-shadow: var(--inset-primary); }

.work-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  position: relative;
  width: 512px;
  max-width: 100%;
  height: 103px;
  text-align: center;
}
.section-title h2 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 53px;
  color: #fff;
  text-shadow: var(--shadow-text);
  transform: translateX(6px);
}
.swoosh {
  position: absolute;
  left: -1px;
  top: 45px;
  width: 507px;
  max-width: 100%;
  height: auto;
  transform: rotate(174.63deg) scaleY(-1);
}

.project {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 0 0 374px;
  padding-top: 80px;
}
.project-info p {
  font-weight: 500;
  font-size: 18px;
  line-height: 26px;
  color: var(--on-dark-muted);
  text-shadow: var(--shadow-text);
}

.app-name { display: flex; align-items: center; gap: 14px; }
.app-name h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 53px;
  color: #fff;
  text-shadow: var(--shadow-text);
  white-space: nowrap;
}

/* App icon: rounded square with a tri-colour strip and a colour-dodge gloss */
.app-icon {
  position: relative;
  width: 64.56px;
  height: 64.56px;
  flex: none;
  /* drop-shadow follows the icon's rounded mask, unlike box-shadow */
  filter:
    drop-shadow(0 1px 2px rgba(17, 19, 65, 0.35))
    drop-shadow(0 8px 14px rgba(17, 19, 65, 0.4));
}
.app-icon-mask {
  position: absolute;
  inset: 0;
  background: #2c2d4b;
  -webkit-mask: url("assets/app-icon-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("assets/app-icon-mask.svg") 0 0 / 100% 100% no-repeat;
}
.bar { position: absolute; top: 0; height: 2.16px; }
.bar--red   { left: 0;       width: 20.64px; background: #f30000; }
.bar--white { left: 20.64px; width: 22.63px; background: #fff; }
.bar--blue  { left: 43.27px; width: 21.29px; background: #006ef3; }
.app-icon-gloss {
  position: absolute;
  left: 6.2px;
  top: 7.22px;
  width: 52.27px;
  height: 51.91px;
  overflow: hidden;
  mix-blend-mode: color-dodge;
}
.app-icon-gloss img {
  width: 331.56%;
  max-width: none;
  height: 100%;
}

/* Three phone screens. Positions are percentages of the 727 × 464 Figma box. */
.screens {
  position: relative;
  flex: 0 1 727px;
  aspect-ratio: 727 / 464;
}
.screen {
  position: absolute;
  height: auto;
  border: 4px solid #fefefe;
  border-radius: 13px;
  box-shadow: 0 24px 34px rgba(0, 0, 0, 0.35);
  background: #2c2d4b;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
}
.screen--1 { width: 30.01%; left: 21.36%; top: 58.45%; --rot: -7.43deg; }
.screen--2 { width: 29.95%; left: 50.17%; top: 50.77%; }
.screen--3 { width: 29.95%; left: 79.40%; top: 58.45%; --rot: 6.29deg; }

/* Gentle float. `translate` and `rotate` stack on top of each screen's own
   transform; different lengths and offsets keep the three out of sync. */
@keyframes float-a {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: 0 -4px; rotate: -0.3deg; }
}
@keyframes float-b {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: 0 -5px; rotate: 0.25deg; }
}
.screen { animation: float-a 9.5s ease-in-out infinite; }
.screen--1 { animation-delay: -2s; }
.screen--2 { animation-name: float-b; animation-duration: 11s; animation-delay: -5s; }
.screen--3 { animation-duration: 8.5s; animation-delay: -7s; animation-direction: reverse; }

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding-top: 138px;
  padding-bottom: 120px;
}

.contact-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.contact-intro h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 53px;
  color: var(--ink-900);
}
.contact-intro p {
  max-width: 604px;
  font-weight: 500;
  font-size: 20px;
  line-height: 34px;
  color: var(--ink-500);
}

.contact-body {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  width: 100%;
}

.form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  flex: 0 1 680px;
  min-width: 0;
  position: relative;
  padding: 46px 40px 40px; /* extra 6px on top for the airmail band */
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: drop-shadow(0 1px 1px rgba(17, 19, 65, 0.1)) drop-shadow(0 12px 16px rgba(17, 19, 65, 0.08));
}

/* Airmail envelope edge: slanted vintage post-box red and cream stripes */
.form::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 6px;
  border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--mail-red) 0 8px,
    var(--mail-cream) 8px 16px
  );
  box-shadow: inset 0 -1px 0 rgba(17, 19, 65, 0.08);
}

.label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  line-height: normal;
  color: var(--ink-800);
}

.topic { border: 0; margin: 0; padding: 0; min-width: 0; }
.topic legend { padding: 0; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip { position: relative; display: inline-block; cursor: pointer; transition: transform .35s var(--spring); }
.chip:hover { transform: translateY(-1px); }
.chip:active { transform: scale(0.94); transition-duration: .08s; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  line-height: normal;
  color: var(--ink-500);
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover span { border-color: var(--ink-300); }
.chip input:checked + span {
  background: var(--ink-600);
  border-color: var(--ink-600);
  color: #fff;
  box-shadow: var(--inset-primary);
}
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.row { display: flex; gap: 20px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; width: 100%; }

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 2px 3px rgba(17, 19, 65, 0.08);
  font: 400 16px/normal var(--font-body);
  color: var(--ink-900);
  transition: border-color .15s;
}
.input::placeholder { color: var(--ink-300); opacity: 1; }
.input:focus { outline: none; border-color: var(--ink-600); }
.input--multi { height: 150px; resize: vertical; }

.details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  flex: 1 1 0;
  min-width: 0;
  padding-top: 40px;
}
.detail { display: flex; flex-direction: column; gap: 6px; }
.detail--social { gap: 12px; }
.detail-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-500);
}
.detail-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink-900);
  overflow-wrap: anywhere;
}
a.detail-value {
  align-self: flex-start;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size .4s var(--spring), color .2s ease;
}
a.detail-value:hover { color: var(--ink-600); background-size: 100% 2px; }
a.detail-value:active { color: var(--ink-900); }

.input { transition: border-color .15s, box-shadow .2s ease; }
.input:focus { box-shadow: inset 0 2px 3px rgba(17, 19, 65, 0.08), 0 0 0 3px rgba(230, 174, 101, 0.35); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 20px;
  border-radius: 8px;
  background: var(--surface-muted);
}
.note img { flex: none; }
.note p {
  font-weight: 500;
  font-size: 16px;
  line-height: 26px;
  color: var(--ink-500);
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 40px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 15px;
  color: var(--ink-500);
}
.tagline { font-family: var(--font-display); font-weight: 500; white-space: nowrap; }

/* Required link to the official complaints book (livroreclamacoes.pt) */
.complaints {
  color: var(--ink-500);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.complaints:hover { color: var(--ink-900); text-decoration-color: var(--accent); }

/* ---------- Thanks page ---------- */

.thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-block: 120px;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .work { height: auto; padding-bottom: 0; }
  .project { flex-direction: column; align-items: center; gap: 40px; }
  .project-info { flex: none; max-width: 560px; padding-top: 24px; align-items: center; text-align: center; }
  .screens { width: 100%; max-width: 727px; flex: none; margin-bottom: -7%; }
  .contact { padding-top: 120px; }
}

/* Footer: below ~1000px the three items no longer fit on one line, so stack
   and centre them, slightly larger, with more room around them */
@media (max-width: 1000px) {
  .footer { gap: 36px; padding-bottom: 64px; }
  .footer-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    font-size: 16px;
    text-align: center;
  }
  .legal { line-height: 1.5; text-wrap: balance; }
  .legal .nowrap { white-space: nowrap; }
}

@media (max-width: 900px) {
  .contact-body { flex-direction: column; gap: 40px; }
  .form { flex: none; width: 100%; }
  .details { padding-top: 0; flex: none; width: 100%; }

  /* Centre the contact details once they sit below the form */
  .details { align-items: center; text-align: center; }
  .detail { align-items: center; }
  a.detail-value { align-self: center; }
  .note { display: block; max-width: 520px; margin-inline: auto; text-align: center; }
  .note img { display: inline-block; margin-right: 10px; vertical-align: -1px; }
  .note p { display: inline; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }

  .header { gap: 20px; padding-top: 24px; }
  .logo img { width: 130px; }
  .social { gap: 28px; }
  .header .nav { display: none; }
  .header .btn--small { padding: 8px 14px; font-size: 14px; }
  .stickybar .btn--small { display: none; } /* "Contact" is already in the bar's nav */

  .stickybar { height: 56px; }
  .logo--compact img { width: 88px; }
  .nav--compact { gap: 22px; font-size: 15px; }
  .social--compact { display: none; }
  #apps, #contact { scroll-margin-top: 56px; }

  .hero { gap: 20px; padding-top: 48px; padding-bottom: 56px; }
  .hero h1 { font-size: 40px; line-height: 1.1; }
  .lead { font-size: 18px; line-height: 30px; }

  .work { padding-top: 48px; }
  .section-title { height: auto; padding-bottom: 28px; }
  /* Swoosh size and position scale with the heading, matching the desktop proportions */
  .section-title { --title-fs: clamp(24px, 8.2vw, 32px); }
  .section-title h2 { font-size: var(--title-fs); line-height: 44px; white-space: nowrap; transform: none; }
  .swoosh {
    left: 50%;
    top: calc(22px + 0.37 * var(--title-fs));
    width: min(calc(10.6 * var(--title-fs)), 100%);
    transform: translateX(-50%) rotate(174.63deg) scaleY(-1);
  }
  .app-name h3 { font-size: 32px; }
  .project-info p { font-size: 16px; line-height: 24px; }
  .screen { border-width: 3px; border-radius: 9px; }

  .contact { gap: 36px; padding-top: 96px; padding-bottom: 72px; }
  .contact-intro h2 { font-size: 36px; line-height: 44px; }
  .contact-intro p { font-size: 17px; line-height: 28px; }
  .form { padding: 30px 20px 24px; }
  .row { flex-direction: column; gap: 24px; }
  .form .btn { width: 100%; }
  .detail-value { font-size: 19px; }

  .footer-row { font-size: 15px; }
}
