@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --ink: #251d30;
  --muted: #564d5c;
  --accent: #573993;
  --lavender: #e1d4ff;
  --line: #dcd4df;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #794dc5; outline-offset: 4px; }
[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(1200px, calc(100% - 104px)); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 3;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  transform: translateY(-170%);
  background: var(--ink);
  color: #fff;
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner, .contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-inner { min-height: 76px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
.main-nav, .footer-inner nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 3vw, 2.15rem);
}
.main-nav a, .footer-inner nav a {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 44px;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
}
.main-nav a:hover, .footer-inner nav a:hover { text-decoration: underline; text-underline-offset: .22em; }
.main-nav .nav-contact {
  padding: .35rem .9rem;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.nav-contact:hover { border-color: var(--accent); }
.eyebrow {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .115em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: 1.035fr 1fr;
  gap: clamp(24px, 4.5vw, 72px);
  align-items: center;
  padding-block: 65px 82px;
}
.hero-copy { align-self: center; padding-bottom: 42px; }
.hero-label { display: inline-flex; align-items: center; gap: .7rem; }
.hero-label::before { content: ""; width: 21px; height: 1px; background: var(--accent); }
.hero h1 {
  margin-block: .12em .19em;
  font-size: clamp(3.6rem, 5.55vw, 5.15rem);
  line-height: .92;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero h1 em { display: block; margin-top: .1em; color: var(--accent); }
.hero-intro {
  max-width: 35ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.46vw, 1.24rem);
  line-height: 1.55;
  margin-bottom: 1.55rem;
}
.button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  min-height: 48px;
  padding: .66rem 1rem .66rem 1.15rem;
  font-size: .89rem;
  font-weight: 650;
  text-decoration: none;
  color: #fff;
  background: var(--ink);
  border: 1px solid transparent;
  border-radius: 99px;
  transition: background .18s, color .18s;
}
.button:hover { background: var(--accent); }
.button span { font-size: 1.05rem; }

.lead-project { min-width: 0; border: 1px solid var(--line); border-radius: 23px; overflow: hidden; background: #fffcf7; }
.lead-project:focus-within { overflow: visible; }
.lead-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.38;
  display: grid;
  place-items: center;
  background: #d9c9fc;
  border-radius: 22px 22px 0 0;
}
.orbit { position: absolute; border: 1px solid #775da94d; border-radius: 50%; }
.orbit-outer { width: 77%; aspect-ratio: 1; }
.orbit-inner { width: 58%; aspect-ratio: 1; }
.lead-star {
  position: absolute;
  top: 7%;
  right: 6%;
  color: #4e317c;
  font-size: clamp(1.75rem, 4vw, 3.4rem);
  line-height: 1;
}
.lead-shot {
  position: absolute;
  width: 30.5%;
  border-radius: 8%;
  overflow: hidden;
  box-shadow: 0 16px 28px #33224546, 0 0 0 1px #4f336022;
  transition: transform .35s ease;
}
.lead-shot.primary { top: 8%; left: 25%; transform: rotate(-11deg); }
.lead-shot.secondary { top: 12%; left: 49%; transform: rotate(12deg); }
.lead-info {
  padding: 17px 21px 12px;
}
.lead-info h2 { font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1; }
.lead-info > p:not(.eyebrow) { font-size: .88rem; color: var(--muted); margin-top: .32rem; }
.lead-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-decoration: none; }
.lead-title:hover { text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: .04em; }
.round-link {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font: 400 1.24rem var(--sans);
  text-decoration: none;
  transition: background .18s, color .18s;
}
.lead-title:hover .round-link { background: var(--accent); color: #fff; }
.text-link, .project-link {
  display: inline-flex;
  align-items: center;
  gap: .46em;
  min-height: 44px;
  color: var(--accent);
  font-size: .86rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.text-link:hover, .project-link:hover { text-decoration-thickness: 2px; }
.text-link span, .project-link span { display: inline-block; transition: transform .2s ease; }
.text-link:hover span, .project-link:hover span { transform: translate(2px, -2px); }

.portfolio { padding-bottom: 48px; border-top: 1px solid var(--line); }
.section-top { margin-bottom: 26px; padding-top: 30px; }
.section-top h2, .maker h2, .contact h2 {
  font-size: clamp(3.25rem, 6vw, 5.15rem);
  line-height: .96;
  letter-spacing: -.033em;
}
.featured { display: grid; grid-template-columns: 1.27fr 1fr; gap: 24px; align-items: stretch; }
.featured .project { border: 1px solid var(--line); border-radius: 21px; background: #fffcf7; }
.project-image {
  min-width: 0;
  overflow: hidden;
  display: grid;
  align-items: end;
  justify-items: center;
}
.project-image img { transition: transform .35s ease; }
.featured .project-image {
  height: clamp(218px, 28.5vw, 388px);
  grid-template-rows: minmax(0, 1fr);
  border-radius: 20px 20px 0 0;
}
.project--puffinmint .project-image { background: #dceee8; }
.project--sitemapxml .project-image { background: #eddfc7; }
.preview-link {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  padding: 14px 14px 0;
  text-decoration: none;
}
.preview-link:focus-visible { outline-offset: -5px; border-radius: inherit; }
.preview-link img {
  width: auto;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 18px #2b222b29;
}
.preview-label {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  justify-self: end;
  min-height: 38px;
  font-size: .78rem;
  font-weight: 650;
}
.preview-link:hover .preview-label { text-decoration: underline; text-underline-offset: .22em; }

.screenshot-dialog {
  width: min(94vw, 83rem);
  max-width: none;
  max-height: min(92vh, 92dvh);
  padding: clamp(12px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
}
.screenshot-dialog::backdrop { background: #251d30d4; }
.screenshot-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.screenshot-heading h2 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.screenshot-heading button { cursor: pointer; font-family: inherit; }
.screenshot-hint { margin-block: .35rem .6rem; color: var(--muted); font-size: .82rem; }
.screenshot-scroll {
  max-height: min(69vh, 69dvh);
  overflow: auto;
  background: #ece7ed;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.screenshot-scroll img { margin-inline: auto; max-width: 100%; min-width: 44rem; }
.project-summary { min-width: 0; }
.featured .project-summary { padding: 24px 25px 14px; }
.project h3 { font-size: clamp(2.3rem, 4.35vw, 3.65rem); line-height: 1.03; letter-spacing: -.022em; }
.project-description { color: var(--muted); margin-block: .45rem .45rem; }
.archive { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 36px; }
.archive .project {
  display: grid;
  grid-template-columns: minmax(110px, .7fr) 1fr;
  align-items: center;
  gap: 22px;
  padding-block: 23px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.archive .project-image { aspect-ratio: 1; border-radius: 13px; }
.archive .project h3 { font-size: clamp(2rem, 3.2vw, 2.9rem); }
.archive .project-description { font-size: .9rem; }
.project--colloquiamo .project-image { background: #eededc; align-items: center; }
.project--colloquiamo .project-image img {
  max-width: none;
  width: 144%;
  justify-self: start;
  margin-left: 12%;
  border-radius: 7px;
  box-shadow: 0 5px 22px #54283438;
}
.project--gotthard-panic .project-image { background: #dce4ce; }
.project--gotthard-panic .project-image img { width: 63%; border-radius: 7px 7px 0 0; transform: translateY(12%) rotate(7deg); box-shadow: 0 6px 20px #2c3b2d38; }

.client-work { padding-bottom: 66px; border-top: 1px solid var(--line); }
.client-work .project {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffcf7;
}
.client-work .project-image { border-radius: 12px; }
.client-work .project-summary { padding: 8px 14px 8px 0; }
.project-actions { display: flex; flex-wrap: wrap; gap: 0 17px; }

.maker { display: grid; grid-template-columns: .92fr 1fr; align-items: center; gap: 8%; padding-block: 86px; }
.portrait { overflow: hidden; border-radius: 18px; }
.portrait img { width: 100%; }
.maker h2 { margin-block: .14em .22em; }
.maker p:not(.eyebrow) { max-width: 44ch; color: var(--muted); }
.maker p + p { margin-top: .72rem; }
.contact { background: var(--lavender); padding-block: 43px 51px; }
.contact-inner { gap: 22px; }
.contact h2 { margin-bottom: .55rem; }
.contact p { max-width: 48ch; color: #40344d; }
.contact .button { flex: 0 0 auto; }
.site-footer { padding-block: 21px; }
.footer-inner { gap: 18px; font-size: .85rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lead-project:hover .primary { transform: translateY(-5px) rotate(-13deg); }
  .lead-project:hover .secondary { transform: translateY(-8px) rotate(14deg); }
  .preview-link:hover img { transform: scale(1.018); }
  .project--gotthard-panic:hover img { transform: translateY(8%) rotate(3deg); }
  .project--colloquiamo:hover img { transform: translateX(-4%); }
}
@media (max-width: 1100px) {
  .shell { width: calc(100% - 72px); }
  .hero { gap: 32px; }
  .hero-copy { padding-bottom: 24px; }
  .archive .project { gap: 16px; }
}
@media (max-width: 850px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 24px; padding-block: 49px 61px; }
  .hero h1 { font-size: clamp(3.05rem, 6.7vw, 3.65rem); }
  .featured { gap: 16px; }
  .archive { grid-template-columns: 1fr; gap: 0; }
  .archive .project { grid-template-columns: 155px minmax(0, 1fr); }
  .archive .project + .project { border-top: 0; }
  .maker { gap: 5%; padding-block: 65px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 65px; gap: 6px; }
  .brand { gap: .4rem; font-size: .8rem; }
  .brand img { width: 27px; }
  .main-nav { gap: .65rem; }
  .main-nav a { font-size: .74rem; }
  .main-nav .nav-contact { padding: 0; border: 0; }
  .nav-contact span { display: none; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding-block: 40px 45px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(3.4rem, 10.7vw, 4.75rem); }
  .hero-intro { margin-bottom: 1.15rem; }
  .lead-info { padding: 14px 16px 10px; }
  .lead-star { font-size: 2.2rem; }
  .section-top { padding-top: 24px; margin-bottom: 17px; }
  .featured { grid-template-columns: 1fr; }
  .featured .project-image { height: clamp(208px, 57vw, 300px); }
  .featured .project-summary { padding: 18px 18px 9px; }
  .archive { margin-top: 24px; }
  .archive .project { grid-template-columns: minmax(100px, 32%) minmax(0, 1fr); gap: 14px; padding-block: 18px; }
  .archive .project-description { font-size: .85rem; }
  .portfolio { padding-bottom: 43px; }
  .client-work { padding-bottom: 43px; }
  .client-work .project { grid-template-columns: 1fr; gap: 13px; padding: 12px; }
  .client-work .project-summary { padding: 2px 6px 0; }
  .maker { grid-template-columns: 1fr; gap: 22px; padding-block: 46px; }
  .maker-copy { grid-row: 1; }
  .contact { padding-block: 35px 40px; }
  .contact-inner, .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.story { max-width: 930px; padding-block: 50px 78px; }
.story-intro { max-width: 47rem; margin-bottom: 30px; }
.story h1 {
  margin-block: .08em .2em;
  font-size: clamp(3.6rem, 9.5vw, 7.45rem);
  line-height: .88;
  letter-spacing: -.04em;
}
.story h1 em { display: block; color: var(--accent); }
.story-intro > p { max-width: 46ch; font-size: clamp(1rem, 1.8vw, 1.26rem); color: var(--muted); }
.story-photo img { width: 100%; border-radius: 17px; }
.story-photo figcaption { font-size: .83rem; color: var(--muted); margin-top: .44rem; }
.story-body { max-width: 41rem; margin: 40px auto 0; }
.story-body section { padding-block: 24px 25px; border-top: 1px solid var(--line); }
.story-body h2 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.04;
  margin-bottom: .42em;
}
.story-body p { color: var(--muted); }
.story-body p + p { margin-top: .55rem; }
.story + .site-footer { border-top: 1px solid var(--line); }

@media (max-width: 680px) {
  .story { padding-block: 28px 48px; }
  .story-intro { margin-bottom: 22px; }
  .story-body { margin-top: 27px; }
}


.recent-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 36px;
}
.recent-projects .project {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fffcf7;
}
.recent-projects .project-image {
  height: clamp(240px, 28vw, 355px);
  padding: 16px 16px 0;
}
.recent-projects .project-summary { padding: 21px 24px 13px; }
.recent-projects h3 { font-size: clamp(2.2rem, 3.9vw, 3.25rem); }
.project--the-dog-moon .project-image { background: #dcd6e9; }
.project--scanner-online .project-image { background: #e9e3d7; }
.project--dog-astrology .project-image { background: #d7e8dc; }
.project--calcola-percentuale .project-image { background: #f0dfd5; }
@media (max-width: 850px) {
  .recent-projects { gap: 16px; }
  .recent-projects .project-summary { padding-inline: 18px; }
}
@media (max-width: 680px) {
  .recent-projects { grid-template-columns: 1fr; margin-top: 24px; }
  .recent-projects .project-image { height: clamp(225px, 64vw, 335px); }
  .recent-projects .project-summary { padding-block: 18px 9px; }
}
