:root {
  /* RaffaeleLab Airy 1.0.0 */
  --primary: #0a7c68;
  --secondary: #e0a534;
  --ink: #1f3443;
  --paper: #fafcfb;
  --surface: #fff;
  --shadow: #102832;
  --focus: #286ddd;
  --muted: #536571;
  --line: #d7e1dc;
  --mono: ui-monospace, SFMono-Regular, monospace;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
::selection { background: #c1e5da; color: var(--ink); }
.wrap { width: min(1160px, calc(100% - 104px)); margin-inline: auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; top: 5px; left: 8px; z-index: 5; padding: .6rem 1rem; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.header-row { min-height: 78px; display: flex; align-items: center; gap: 38px; }
.brand { display: inline-flex; gap: 0; align-items: center; color: var(--ink); font-size: 1.35rem; line-height: 1; font-weight: 740; text-decoration: none; letter-spacing: -.065em; }
.brand > span:last-child:not(.brand-icon) { color: var(--primary); }
.brand-icon { position: relative; flex: none; width: 35px; height: 35px; margin-right: 9px; border-radius: 9px; background: var(--primary); }
.brand-icon::before { content: ""; position: absolute; inset: 2px; background: #fff; mask: url("raffaelelab.png") no-repeat center / contain; }
.main-nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.main-nav a, .header-contact, .actions a, .text-link { font-size: .91rem; font-weight: 610; text-decoration: none; }
.main-nav a { padding-block: 7px; }
.main-nav a[aria-current="page"] { color: var(--primary); text-decoration: underline; text-underline-offset: 5px; }
.main-nav a:hover, .text-link:hover, .page-footer a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 5px; }
.header-contact { display: inline-flex; justify-content: center; align-items: center; gap: 15px; background: var(--surface); color: var(--ink); padding: 9px 16px; border: 1px solid #a4b5ad; border-radius: 7px; }
.header-contact:hover { background: #edf6f1; border-color: var(--primary); }
.header-contact span { font-size: 1.07rem; color: var(--primary); line-height: 1; }
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 79% 50%, #e9f3eb 0%, transparent 53%), var(--paper); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: center; padding-block: clamp(54px, 5vw, 82px); }
.eyebrow, .date { font-family: var(--mono); font-size: .72rem; font-weight: 600; line-height: 1.45; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow { color: var(--primary); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--primary); flex: none; }
h1, h2, h3 { text-wrap: balance; }
.hero h1 { font-size: clamp(3.15rem, 4.55vw, 4.12rem); font-weight: 670; line-height: 1.055; letter-spacing: -.073em; margin: 24px 0 23px; }
.hero h1 em { color: var(--primary); font-style: normal; }
.marked { position: relative; display: inline-block; isolation: isolate; }
.marked::after { content: ""; position: absolute; left: 1%; right: 0; bottom: -.065em; height: .08em; z-index: -1; background: var(--secondary); border-radius: 70% 20% 55% 35%; transform: rotate(-2deg); }
.hero-intro { color: var(--muted); font-size: clamp(1.01rem, 1.25vw, 1.14rem); line-height: 1.7; max-width: 53ch; }
.hero-intro strong { color: var(--ink); font-weight: 650; }
.actions, .text-link, .button { display: flex; align-items: center; }
.actions { gap: clamp(16px, 2vw, 28px); flex-wrap: wrap; margin-top: 29px; }
.button, .text-link { display: inline-flex; justify-content: center; gap: 10px; line-height: 1.4; }
.button { min-height: 48px; padding: 12px 17px; border-radius: 7px; }
.primary { color: white; background: var(--primary); border: 1px solid var(--primary); box-shadow: 0 2px 2px #10283210; }
.primary:hover { background: #075f50; }
.text-link { padding-block: 8px; }
.text-link .icon { color: var(--primary); width: 17px; }

.portrait-scene { position: relative; isolation: isolate; display: grid; place-items: center; padding: 23px 35px 23px 27px; }
.portrait-grid { position: absolute; z-index: -2; inset: -3% -12% -4% -10%; background-image: linear-gradient(#719a8d36 1px, transparent 1px), linear-gradient(90deg, #719a8d36 1px, transparent 1px); background-size: 23px 23px; mask-image: radial-gradient(ellipse, black 39%, #0009 61%, transparent 77%); }
.portrait { width: min(100%, 410px); }
.portrait-clock { position: relative; aspect-ratio: 1; -webkit-touch-callout: none; user-select: none; }
.portrait-clock-face { position: absolute; inset: 15.5% 16% auto; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #08120b; rotate: var(--portrait-angle, 0deg); }
.portrait-clock img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.portrait-clock-ring { position: relative; }
.portrait figcaption { min-height: 36px; padding: 4px 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 15px; }
.portrait figcaption strong { font-size: .84rem; font-weight: 650; letter-spacing: -.025em; }
.portrait figcaption span { display: inline-flex; align-items: center; gap: 3px; font: .65rem/1.4 var(--mono); color: var(--muted); }
.portrait figcaption .icon { width: 12px; height: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .portrait-clock:not(.is-ready) .portrait-clock-face { rotate: 0deg; }
  .portrait-clock.is-ready .portrait-clock-face { animation: portrait-turn 1.8s cubic-bezier(.2, .65, .22, 1) backwards; }
  .portrait-clock.is-ready .portrait-clock-ring { animation: calendar-turn 1.8s cubic-bezier(.2, .65, .22, 1); }
}
@keyframes portrait-turn {
  from { rotate: 0deg; }
  to { rotate: var(--portrait-angle); }
}
@keyframes calendar-turn {
  from { rotate: 360deg; }
  to { rotate: 0deg; }
}
.register-mark { position: absolute; width: 12px; height: 12px; color: #6e9a8e; }
.register-mark::before, .register-mark::after { content: ""; position: absolute; background: currentColor; }
.register-mark::before { left: 0; right: 0; top: 5px; height: 1px; }
.register-mark::after { top: 0; bottom: 0; left: 5px; width: 1px; }
.northwest { top: 5%; left: 4%; }
.southeast { bottom: 5%; right: 6%; }

.section { padding-block: clamp(56px, 6vw, 88px); }
.section h2 { font-size: clamp(2.05rem, 3.35vw, 3.05rem); line-height: 1.09; letter-spacing: -.061em; font-weight: 660; }
.section .eyebrow { margin-bottom: 15px; }
.section-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 35px; }
.section-intro > p { max-width: 40ch; color: var(--muted); font-size: .98rem; }
.services { background: var(--surface); }
.service-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 30px; }
.service-card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: clamp(21px, 2.3vw, 31px); }
.service-icon { display: block; width: 47px; height: 47px; padding: 10px; border: 1px solid #c8e3d9; background: #e5f2ec; color: var(--primary); border-radius: 11px; }
.service-card:nth-child(2) .service-icon { color: #835c15; background: #faf1df; border-color: #f0dfba; }
.service-card:nth-child(3) .service-icon { color: #35566a; background: #e8eff1; border-color: #d4e2e6; }
.service-card h3, .timeline h3 { font-size: 1.3rem; line-height: 1.28; letter-spacing: -.038em; font-weight: 650; }
.service-card h3 { margin: 18px 0 8px; }
.service-card p, .timeline p { font-size: .97rem; line-height: 1.65; color: var(--muted); }
.story { background: #17232d; color: #eaf3f7; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 8vw, 125px); }
.story .eyebrow, .story .text-link, .story .icon { color: #6fe0c5; }
.story .eyebrow::before { background: #6fe0c5; }
.story-lead, .story .timeline p { color: #c4d2d8; }
.story-lead { max-width: 41ch; margin-block: 1.3rem .8rem; font-size: 1.04rem; line-height: 1.7; }
.timeline { padding: 0; margin: 0; list-style: none; }
.timeline li { position: relative; border-left: 1px solid #52626a; padding: 0 0 27px 26px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; width: 9px; height: 9px; background: #17232d; border: 2px solid #6fe0c5; border-radius: 50%; position: absolute; left: -5px; top: 6px; }
.timeline li:last-child::before { background: #6fe0c5; }
.timeline .date { color: #93bfaf; font-size: .66rem; }
.timeline h3 { margin-block: 3px 5px; }
.notes { background: var(--paper); }
.note-list { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.note-list a { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 25px; padding: 22px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.note-list a:hover { color: var(--primary); background: #eff5f1; }
.note-list time { font: .75rem/1.5 var(--mono); text-transform: uppercase; color: var(--muted); letter-spacing: .025em; }
.note-list span { font-size: 1.15rem; font-weight: 610; line-height: 1.4; letter-spacing: -.032em; }
.note-list .icon { color: var(--primary); }
.contact { border-block: 1px solid #c8ded4; background: #e8f3ed; }
.contact-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.contact p:not(.eyebrow) { margin-top: 14px; max-width: 48ch; color: var(--muted); }
.contact-links { justify-self: end; display: grid; justify-items: start; gap: 10px; }
.email { display: inline-flex; align-items: center; column-gap: 8px; font-weight: 640; font-size: clamp(1.1rem, 2vw, 1.65rem); color: var(--primary); letter-spacing: -.048em; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.page-footer { background: var(--surface); }
.footer-row { padding-block: 27px; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: .82rem; color: var(--muted); }
.footer-row p { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.footer-row p strong { color: var(--ink); font-size: .94rem; }
.footer-row a { font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 64px); }
  .header-row { gap: 26px; }
  .main-nav { gap: 22px; }
  .hero-layout { grid-template-columns: 1.25fr .85fr; gap: 18px; }
  .hero h1 { font-size: clamp(2.9rem, 5.6vw, 3.3rem); }
  .portrait-scene { padding: 20px 13px; }
  .section-intro { align-items: flex-start; }
  .service-grid { gap: 12px; }
  .service-card { padding: 20px; }
}
@media (max-width: 810px) {
  .header-row { min-height: auto; padding-block: 12px 8px; display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; }
  .header-contact { grid-column: 2; grid-row: 1; padding: 8px 12px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; margin: 0; min-width: 0; flex-wrap: wrap; gap: 0 clamp(12px, 3.6vw, 25px); }
  .main-nav a { font-size: .83rem; padding-block: 3px; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 40px, 540px); }
  .hero-layout { grid-template-columns: 1fr; gap: 30px; padding-block: 42px 35px; }
  .hero h1 { font-size: clamp(2.6rem, 8.9vw, 3.7rem); margin: 18px 0 20px; }
  .eyebrow { font-size: .66rem; }
  .hero-intro { font-size: 1rem; }
  .actions { margin-top: 22px; }
  .portrait-scene { width: min(100%, 355px); margin-inline: auto; padding-block: 12px; }
  .portrait { width: min(100%, 325px); }
  .portrait figcaption { min-height: 39px; }
  .section-intro { display: block; }
  .section-intro > p { margin-top: 12px; }
  .service-grid, .story-grid, .contact-layout { grid-template-columns: 1fr; }
  .service-card { padding: 23px; }
  .service-grid { gap: 12px; margin-top: 23px; }
  .story-grid, .contact-layout { gap: 28px; }
  .note-list a { grid-template-columns: 1fr auto; gap: 5px 15px; padding-block: 17px; }
  .note-list a time { grid-column: 1; }
  .note-list a span { grid-column: 1; }
  .note-list .icon { grid-column: 2; grid-row: 1 / 3; }
  .contact-links { justify-self: start; gap: 6px; }
  .footer-row { align-items: flex-start; flex-direction: column; gap: 10px; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 32px); }
  .brand { font-size: 1.1rem; }
  .brand-icon { width: 29px; height: 29px; margin-right: 6px; }
  .header-contact { font-size: .81rem; gap: 6px; padding: 7px 8px; }
  .main-nav { gap: 4px; justify-content: space-between; }
  .main-nav a { font-size: .75rem; }
  .actions { align-items: flex-start; flex-direction: column; gap: 5px; }
  .portrait-scene { padding-inline: 4px; }
}

.portfolio-section { border-top: 1px solid var(--line); }
.portfolio-section:nth-of-type(even) { background: var(--surface); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin-top: 25px;
}
.portfolio-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  overflow-wrap: anywhere;
}
.portfolio-card h3 { font-size: 1.35rem; line-height: 1.22; margin-bottom: .65rem; }
.portfolio-card > p:not(.eyebrow), .reference-card figcaption span { color: var(--muted); }
.portfolio-card .text-link { margin-top: .65rem; color: var(--primary); }
.reference-card blockquote { margin: 0 0 1.2rem; white-space: pre-line; }
.reference-card figcaption { display: grid; gap: 3px; }

.carousel { position: relative; margin-top: 22px; }
.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin: 0;
  padding: 5px 5px 12px;
  list-style: none;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  cursor: grab;
}
.carousel-track.is-dragging, .carousel-track.is-dragging .logo-card { cursor: grabbing; }
.carousel-track li { flex: 0 0 clamp(145px, 20vw, 195px); }
.logo-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 110px;
  padding: 14px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: .86rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
  overflow-wrap: anywhere;
}
.logo-card img { width: 100%; height: 60px; object-fit: contain; pointer-events: none; }
.logo-card:hover, .logo-card[aria-expanded="true"] { border-color: var(--primary); }
.logo-card:focus-visible, .carousel-controls button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.carousel-controls:not([hidden]) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.carousel-controls button {
  min-height: 40px;
  padding: 5px 12px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
}
.collab-detail {
  position: absolute;
  z-index: 2;
  top: 100%;
  inset-inline-start: 0;
  width: min(100%, 420px);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 24px #17232d20;
  overflow-wrap: anywhere;
}
.collab-detail p { color: var(--muted); font-size: .92rem; margin-top: 5px; white-space: pre-line; }
.case-study { max-width: 760px; min-height: 65vh; }
.case-study h1 { font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.12; margin: .9rem 0; }
.case-summary { font-size: 1.18rem; color: var(--muted); margin-bottom: 1.8rem; }
.case-body { white-space: pre-wrap; overflow-wrap: anywhere; }
