:root {
  --paper: #f6f4ef;
  --ink: #0a0a0a;
  --muted: #4d5360;
  --line: rgba(10, 10, 10, 0.18);
  --line-strong: rgba(10, 10, 10, 0.42);
  --serif: "Roboto", Arial, sans-serif;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --content: min(92vw, 1530px);
  --header-h: 92px;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); overflow-x: clip; }
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 13% 12%, rgba(255,255,255,.92), transparent 34%),
    linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,.08)),
    var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
body.mobile-nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  width: var(--content);
  height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.brand {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  letter-spacing: .25em;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
  font-family: var(--sans);
  font-size: 14px;
}
.site-nav a {
  position: relative;
  padding: 34px 0 31px;
  white-space: nowrap;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 1px;
  transform: scaleX(0);
  background: currentColor;
  transform-origin: left;
  transition: transform .18s ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.active::after { transform: scaleX(1); }

.menu-toggle { display: none; }

.home-main {
  width: var(--content);
  min-height: calc(100svh - var(--header-h));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(500px, .9fr) minmax(680px, 1.1fr);
  align-items: center;
  gap: clamp(20px, 2.8vw, 52px);
  padding: 34px 0 62px;
}

.eyebrow-rule { display: flex; align-items: center; gap: 22px; }
.eyebrow-rule p,
.section-label {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .31em;
  font-weight: 600;
}
.eyebrow-rule span {
  width: 136px;
  height: 1px;
  background: var(--ink);
  opacity: .72;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}
.hero-copy h1 {
  margin: 42px 0 28px;
  max-width: 720px;
  font-weight: 400;
  font-size: 72px;
  line-height: .95;
  letter-spacing: -.045em;
}
.hero-support {
  margin: 0;
  max-width: 660px;
  color: #313744;
  font-size: 28px;
  line-height: 1.17;
}
.outline-cta {
  margin-top: 45px;
  min-width: 356px;
  max-width: max-content;
  height: 66px;
  padding: 0 31px;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  font-family: var(--sans);
  font-size: 14.5px;
  letter-spacing: .24em;
  transition: background .18s ease, color .18s ease;
}
.outline-cta:hover,
.outline-cta:focus-visible { background: var(--ink); color: #fff; }
.outline-cta span { font-size: 1.65rem; letter-spacing: 0; }

.hero-visual {
  min-height: 624px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.laptop {
  width: min(96%, 840px);
  position: relative;
  z-index: 1;
  transform: translateY(14px);
}
.laptop-screen {
  aspect-ratio: 16 / 9.15;
  background: #090909;
  border: 12px solid #0a0a0b;
  border-radius: 20px 20px 8px 8px;
  box-shadow: 0 26px 44px rgba(0,0,0,.20), inset 0 0 0 1px #484848;
  overflow: hidden;
  padding: 16px;
}
.laptop-screen-fill {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0,0,0,.04);
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.95), rgba(248,247,243,.94) 54%, rgba(239,237,232,.9) 100%),
    #f5f3ee;
}
.laptop-camera {
  width: 5px;
  height: 5px;
  background: #1b3d4a;
  border: 1px solid #75858e;
  border-radius: 50%;
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}
.laptop-base {
  width: 110%;
  height: 27px;
  margin-left: -5%;
  background: linear-gradient(#a6a6a6, #4b4b4b 31%, #b9b9b9 45%, #4b4b4b 80%);
  border-radius: 0 0 55% 55% / 0 0 100% 100%;
  box-shadow: 0 18px 18px rgba(0,0,0,.18);
  position: relative;
}
.laptop-base::after {
  content: "";
  position: absolute;
  width: 24%;
  height: 5px;
  background: #444;
  top: 1px;
  left: 38%;
  border-radius: 0 0 8px 8px;
}

.project-media {
  position: relative;
  overflow: hidden;
  background: #f2efe9;
  color: #2a2a2a;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}
.project-media img.is-missing { display: none; }
.asset-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: clamp(.82rem, 1.1vw, 1rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.08)),
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(0,0,0,.045) 33px),
    #e7e2d8;
  border: 1px dashed rgba(0,0,0,.2);
}

.hero-project-stack {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}
.hero-project-card {
  position: absolute;
  border: 10px solid rgba(248,246,241,.98);
  border-radius: 11px;
  background: #f8f6f1;
  box-shadow: 0 13px 28px rgba(0,0,0,.13);
}
.hero-project-card img {
  object-fit: contain;
  background: #f8f6f1;
}
.hero-project-card--sniplify {
  width: clamp(300px, 34vw, 380px);
  aspect-ratio: 1672 / 941;
  left: 0;
  top: 42%;
  transform: translateY(-50%) rotate(-1.1deg);
  z-index: 2;
}
.hero-project-card--ims {
  width: clamp(350px, 38vw, 425px);
  aspect-ratio: 2047 / 1437;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 4;
}
.hero-project-card--ucm {
  width: clamp(245px, 27vw, 300px);
  aspect-ratio: 1440 / 1000;
  right: 0;
  top: 43%;
  transform: translateY(-50%) rotate(1.4deg);
  z-index: 3;
}
.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d2d2d2;
}
.hero-dots span.active { background: #111; }

/* Projects */
.projects-main {
  width: var(--content);
  margin: 0 auto;
  padding: clamp(16px, 2vh, 24px) 0 28px;
}
.projects-intro { margin-bottom: clamp(14px, 1.8vh, 20px); }
.short-rule {
  display: block;
  width: 42px;
  height: 1px;
  background: #49536a;
  margin-bottom: 11px;
}
.projects-intro h1 {
  margin: 0;
  font-size: 24px;
  line-height: .96;
  font-weight: 500;
  letter-spacing: -.035em;
}
.projects-intro p {
  margin: 5px 0 0;
  font-size: 16px;
  line-height: 1.25;
  color: #4f5c78;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.project-card {
  grid-column: span 2;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
  min-width: 0;
  transition: transform .26s ease-out, box-shadow .26s ease-out, border-color .26s ease-out;
}
.project-card--bottom-start { grid-column: 2 / span 2; }
.project-card--bottom-end { grid-column: 4 / span 2; }
.project-media--card {
  aspect-ratio: 14 / 9;
  margin: 7px 7px 0;
  border-radius: 3px;
}
.page-projects .project-media img {
  object-fit: contain;
  object-position: center;
}
.project-body { padding: 8px 14px 12px; }
.project-body h2 {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.025em;
}
.project-body p {
  margin: 0;
  min-height: 2.45em;
  color: #4f5c78;
  font-size: 16px;
  line-height: 1.22;
}
.dark-cta,
.email-cta {
  margin-top: 10px;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  background: #0c0c0c;
  color: #fff;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .06em;
  transition: transform .16s ease, background .16s ease;
}
.dark-cta:hover,
.dark-cta:focus-visible,
.email-cta:hover,
.email-cta:focus-visible { transform: translateY(-1px); background: #222; }
.dark-cta.is-disabled { opacity: .82; cursor: default; }
.page-projects .dark-cta {
  margin-top: 8px;
  min-height: 36px;
  padding: 0 14px;
  gap: 18px;
  border-radius: 7px;
  font-size: .74rem;
  letter-spacing: .05em;
}
.page-projects .dark-cta.is-disabled { opacity: 1; }
.page-scroll .dark-cta.is-disabled { opacity: 1; }
.dark-cta.is-disabled:hover,
.dark-cta.is-disabled:focus-visible {
  transform: none;
  background: #0c0c0c;
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(10, 10, 10, .10);
    border-color: rgba(10, 10, 10, .28);
  }
  .project-card .dark-cta:not(.is-disabled) span {
    transition: transform .18s ease-out;
  }
  .project-card .dark-cta:not(.is-disabled):hover span,
  .project-card .dark-cta:not(.is-disabled):focus-visible span {
    transform: translateX(4px);
  }
}

/* About */
.about-main {
  width: var(--content);
  min-height: calc(100svh - var(--header-h));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(58px, 6vw, 100px);
  align-items: center;
  padding: 48px 0 66px;
}
.about-lead { align-self: center; }
.about-lead h1 {
  margin: 44px 0 0;
  max-width: 650px;
  font-size: 72px;
  line-height: .92;
  font-weight: 400;
  letter-spacing: -.045em;
}
.about-detail {
  border-left: 1px solid var(--line);
  padding-left: clamp(44px, 6vw, 74px);
}
.about-copy p {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
}
.about-copy p + p { margin-top: 34px; }
.about-facts { margin: 66px 0 0; border-top: 1px solid var(--line); }
.about-facts div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.about-facts dt {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .24em;
  color: #666b75;
}
.about-facts dd { margin: 0; font-size: 18px; }

/* Contact */
.page-contact { display: flex; flex-direction: column; min-height: 100svh; }
.contact-main {
  width: min(90vw, 1170px);
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-content: start;
  gap: 68px;
  padding: 86px 0 52px;
}
.contact-lead { padding-right: 30px; }
.contact-lead h1 {
  margin: 34px 0 32px;
  max-width: 560px;
  font-size: 72px;
  line-height: .88;
  font-weight: 400;
  letter-spacing: -.05em;
}
.contact-lead > p:last-child {
  margin: 0;
  max-width: 520px;
  font-size: 26px;
  line-height: 1.45;
  color: #343434;
}
.contact-details {
  border-left: 1px solid var(--line);
  padding-left: clamp(44px, 5vw, 64px);
}
.contact-details > .section-label { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.contact-details dl { margin: 0; }
.contact-details dl div { padding: 34px 0; border-bottom: 1px solid var(--line); }
.contact-details dt {
  margin-bottom: 13px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .27em;
  color: #555b65;
}
.contact-details dd { margin: 0; font-size: 20px; }
.contact-details dd a { overflow-wrap: anywhere; }
.email-cta {
  width: 100%;
  margin-top: 34px;
  min-height: 70px;
  border-radius: 0;
  justify-content: center;
  gap: 16px;
  letter-spacing: .24em;
  font-weight: 600;
  font-size: 14px;
}
.site-footer {
  width: min(92vw, 1430px);
  margin: 0 auto;
  min-height: 100px;
  padding: 22px 16px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-copy { display: flex; align-items: center; gap: 24px; font-size: 16px; }
.footer-location {
  color: var(--ink);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-flag {
  width: 22px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-links > span { width: 1px; height: 25px; background: var(--line); }
.footer-links a { width: 25px; height: 25px; display: grid; place-items: center; }
.footer-links svg { width: 22px; height: 22px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (max-width: 1200px) {
  :root { --content: min(92vw, 1120px); }
  .home-main { grid-template-columns: .92fr 1.08fr; }
  .hero-visual { min-height: 520px; }
  .laptop { width: min(96%, 720px); }
  .hero-project-card--sniplify { width: clamp(260px, 31vw, 320px); left: -1%; }
  .hero-project-card--ims { width: clamp(315px, 35vw, 370px); }
  .hero-project-card--ucm { width: clamp(220px, 24vw, 260px); right: -1%; }
  .hero-dots { bottom: 28px; }
  .about-main { grid-template-columns: .9fr 1.1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 76px; --content: 90vw; }
  body { min-height: 100svh; }
  .menu-toggle {
    display: grid;
    gap: 5px;
    width: 40px;
    height: 40px;
    place-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 25;
  }
  .menu-toggle span { width: 23px; height: 1px; background: var(--ink); transition: transform .18s ease; }
  .menu-toggle.is-open span:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle.is-open span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .site-nav {
    position: fixed;
    inset: 0;
    min-height: 100svh;
    background: var(--paper);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12vw;
    gap: 24px;
    z-index: 22;
    font-size: 1.1rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 0; }
  .site-nav a::after { bottom: 4px; }

  .home-main,
  .about-main,
  .contact-main { display: block; min-height: auto; padding: 48px 0 70px; }
  .home-main { width: 90vw; }
  .hero-copy h1 { font-size: clamp(3rem, 12vw, 5.1rem); }
  .hero-support { max-width: 88%; }
  .outline-cta { min-width: 0; width: 100%; max-width: 400px; }
  .hero-visual { margin-top: 62px; min-height: 500px; }
  .laptop { width: min(100%, 720px); }
  .hero-project-card { border-width: 7px; }
  .hero-project-card--sniplify { width: 48%; left: -1%; top: 46%; }
  .hero-project-card--ims { width: 54%; top: 43%; }
  .hero-project-card--ucm { width: 38%; right: -1%; top: 47%; }
  .hero-dots { bottom: 8px; }

  .projects-main { width: 90vw; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .project-card,
  .project-card--bottom-start,
  .project-card--bottom-end,
  .project-card:last-child { grid-column: span 1; }

  .about-main { width: 90vw; }
  .about-lead h1 { margin-top: 24px; font-size: clamp(3.6rem, 13vw, 6rem); }
  .about-detail { margin-top: 52px; border-left: 0; border-top: 1px solid var(--line); padding: 36px 0 0; }
  .about-facts { margin-top: 44px; }

  .contact-main { width: 90vw; }
  .contact-lead { padding-right: 0; }
  .contact-lead h1 { font-size: clamp(4rem, 15vw, 6.8rem); }
  .contact-details { margin-top: 58px; border-left: 0; border-top: 1px solid var(--line); padding: 34px 0 0; }
  .site-footer { width: 90vw; }
}

@media (max-width: 620px) {
  .brand { font-size: .82rem; letter-spacing: .19em; }
  .hero-copy h1 { line-height: .95; }
  .hero-copy h1 br,
  .hero-support br { display: none; }
  .eyebrow-rule span { display: none; }
  .hero-visual { min-height: 390px; }
  .laptop { width: 100%; }
  .laptop-screen { border-width: 8px; padding: 8px; }
  .hero-project-card { border-width: 5px; border-radius: 7px; }
  .hero-project-card--sniplify { width: 49%; left: -2%; top: 45%; }
  .hero-project-card--ims { width: 56%; top: 43%; }
  .hero-project-card--ucm { width: 40%; right: -2%; top: 46%; }
  .hero-dots { bottom: 4px; gap: 7px; }
  .hero-dots span { width: 8px; height: 8px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card,
  .project-card--bottom-start,
  .project-card--bottom-end,
  .project-card:last-child { grid-column: 1; }
  .project-media--card { aspect-ratio: 14 / 9; }
  .projects-intro p { max-width: 92%; }
  .about-facts div { grid-template-columns: 105px 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; padding-left: 0; padding-right: 0; }
  .footer-copy { flex-direction: column; align-items: flex-start; gap: 7px; }
}

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


/* Single-page scrolling comparison variant */
html { scroll-behavior: smooth; }
.page-scroll-root { scroll-padding-top: calc(var(--header-h) + 20px); }
.page-scroll .site-header {
  position: sticky;
  top: 0;
  background: transparent;
  border-bottom: 0;
}
.page-scroll .site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #faf9f6;
  border-bottom: 1px solid var(--line);
  z-index: 0;
  pointer-events: none;
}
.page-scroll .site-header > * {
  position: relative;
  z-index: 1;
}
.page-scroll .scroll-section { scroll-margin-top: calc(var(--header-h) + 20px); }
.page-scroll .home-main {
  min-height: auto;
  padding-top: 72px;
  padding-bottom: 96px;
}
.page-scroll .projects-main {
  padding-top: 56px;
  padding-bottom: 88px;
}
.page-scroll .about-main {
  min-height: auto;
  padding-top: 96px;
  padding-bottom: 96px;
}
.page-scroll .contact-main {
  min-height: auto;
  padding-top: 96px;
  padding-bottom: 80px;
}
.page-scroll .site-footer { margin-top: 0; }

@media (max-width: 900px) {
  .page-scroll .site-header {
    position: sticky;
    top: 0;
  }
  .page-scroll-root { scroll-padding-top: calc(var(--header-h) + 16px); }
  .page-scroll .scroll-section { scroll-margin-top: calc(var(--header-h) + 16px); }
  .page-scroll .home-main,
  .page-scroll .about-main,
  .page-scroll .contact-main { min-height: auto; }
  .page-scroll .projects-main { padding: 48px 0 70px; }
}

/* Scroll-triggered reveal: progressive entrance while scrolling. */
.page-scroll .scroll-reveal {
  opacity: 0;
  translate: 0 30px;
}
.page-scroll .scroll-reveal.is-revealed {
  animation: scroll-reveal-in 1500ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes scroll-reveal-in {
  from {
    opacity: 0;
    translate: 0 30px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-scroll .scroll-reveal,
  .page-scroll .scroll-reveal.is-revealed {
    opacity: 1 !important;
    translate: none !important;
    animation: none !important;
  }
}

/* TagoKo project gallery */
body.tagoko-gallery-open { overflow: hidden; }
.tagoko-gallery:not([open]) { display: none; }
.tagoko-gallery {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: transparent;
  color: inherit;
  overflow: visible;
}
.tagoko-gallery[open] { display: grid; }
.tagoko-gallery::backdrop { background: transparent; }
.tagoko-gallery__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, .88);
  backdrop-filter: blur(5px);
}
.tagoko-gallery__panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  height: min(920px, 94vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px 22px 18px;
  background: #111;
  color: #f7f5f0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .35);
}
.tagoko-gallery__header,
.tagoko-gallery__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tagoko-gallery__eyebrow {
  margin: 0 0 5px;
  font-size: .7rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: .18em;
  color: rgba(247, 245, 240, .62);
}
.tagoko-gallery__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.01em;
}
.tagoko-gallery__header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tagoko-gallery__counter {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: rgba(247, 245, 240, .72);
  white-space: nowrap;
}
.tagoko-gallery__close,
.tagoko-gallery__nav,
.tagoko-gallery__mobile-nav button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tagoko-gallery__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.55rem;
  line-height: 1;
}
.tagoko-gallery__stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
}
.tagoko-gallery__image-button {
  appearance: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.tagoko-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .3);
}
.tagoko-gallery__nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.15rem;
}
.tagoko-gallery__close:hover,
.tagoko-gallery__close:focus-visible,
.tagoko-gallery__nav:hover,
.tagoko-gallery__nav:focus-visible,
.tagoko-gallery__mobile-nav button:hover,
.tagoko-gallery__mobile-nav button:focus-visible {
  background: #f7f5f0;
  color: #111;
  outline: none;
}
.tagoko-gallery__hint {
  font-size: .72rem;
  color: rgba(247, 245, 240, .58);
}
.tagoko-gallery__mobile-nav { display: none; }
.tagoko-gallery.is-zoomed { overflow: auto; place-items: start center; }
.tagoko-gallery.is-zoomed .tagoko-gallery__backdrop { position: fixed; }
.tagoko-gallery.is-zoomed .tagoko-gallery__panel {
  height: auto;
  min-height: calc(100vh - 44px);
}
.tagoko-gallery.is-zoomed .tagoko-gallery__stage {
  overflow: visible;
  align-items: start;
}
.tagoko-gallery.is-zoomed .tagoko-gallery__image-button {
  height: auto;
  overflow: visible;
  cursor: zoom-out;
}
.tagoko-gallery.is-zoomed .tagoko-gallery__image {
  width: min(1080px, 82vw);
  height: auto;
  max-width: none;
  max-height: none;
}

@media (max-width: 760px) {
  .tagoko-gallery { padding: 10px; }
  .tagoko-gallery__panel {
    width: 100%;
    height: calc(100dvh - 20px);
    padding: 15px 14px 13px;
    gap: 12px;
    border-radius: 6px;
  }
  .tagoko-gallery__header { gap: 12px; }
  .tagoko-gallery__header-actions { gap: 10px; }
  .tagoko-gallery__counter { font-size: .68rem; }
  .tagoko-gallery__close { width: 36px; height: 36px; }
  .tagoko-gallery__stage {
    display: block;
    overflow: hidden;
  }
  .tagoko-gallery__image-button { height: 100%; }
  .tagoko-gallery__nav { display: none; }
  .tagoko-gallery__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .tagoko-gallery__hint { text-align: center; }
  .tagoko-gallery__mobile-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .tagoko-gallery__mobile-nav button {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
  }
  .tagoko-gallery.is-zoomed .tagoko-gallery__panel {
    min-height: calc(100dvh - 20px);
  }
  .tagoko-gallery.is-zoomed .tagoko-gallery__image {
    width: min(1080px, 150vw);
  }
}

/* TagoKo gallery default view: fit the complete phone asset inside the stage.
   The image element keeps its intrinsic aspect ratio; it is never stretched to the
   stage dimensions, which prevents slide-specific clipping. */
.tagoko-gallery:not(.is-zoomed) .tagoko-gallery__image-button {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  align-self: stretch;
  overflow: hidden;
}
.tagoko-gallery:not(.is-zoomed) .tagoko-gallery__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  flex: 0 1 auto;
}
@media (max-width: 760px) {
  .tagoko-gallery:not(.is-zoomed) .tagoko-gallery__image-button {
    margin: 0;
  }
}

/* Procurement Notice Automation inspection view only. Keep its normal gallery
   and TagoKo's existing zoom behavior unchanged. */
.philgeps-gallery.is-zoomed {
  overflow: hidden;
  place-items: center;
  padding: 16px;
}
.philgeps-gallery.is-zoomed .tagoko-gallery__panel {
  width: min(1680px, calc(100vw - 32px));
  height: min(1080px, calc(100dvh - 32px));
  min-height: 0;
  padding: 8px;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr);
}
.philgeps-gallery.is-zoomed .tagoko-gallery__footer {
  display: none;
}
.philgeps-gallery.is-zoomed .tagoko-gallery__stage {
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
  overflow: hidden;
}
.philgeps-gallery.is-zoomed .tagoko-gallery__image-button {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-out;
}
.philgeps-gallery.is-zoomed .tagoko-gallery__image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 760px) {
  .philgeps-gallery.is-zoomed {
    padding: 10px;
  }
  .philgeps-gallery.is-zoomed .tagoko-gallery__panel {
    width: 100%;
    height: calc(100dvh - 20px);
    padding: 0;
    gap: 8px;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .philgeps-gallery.is-zoomed .tagoko-gallery__stage {
    display: block;
    overflow: hidden;
  }
  .philgeps-gallery.is-zoomed .tagoko-gallery__image-button {
    display: grid;
    place-items: center;
  }
  .philgeps-gallery.is-zoomed .tagoko-gallery__footer {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 0 6px 6px;
  }
  .philgeps-gallery.is-zoomed .tagoko-gallery__hint {
    display: none;
  }
}

/* Sniplify demo dialog */
body.sniplify-demo-open { overflow: hidden; }
.sniplify-demo {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 22px;
  border: 0;
  background: transparent;
  color: #f7f5f0;
  overflow: auto;
}
.sniplify-demo:not([open]) { display: none; }
.sniplify-demo[open] {
  display: grid;
  place-items: center;
}
.sniplify-demo::backdrop {
  background: rgba(10, 10, 10, .88);
  backdrop-filter: blur(5px);
}
.sniplify-demo__panel {
  position: relative;
  width: min(1180px, 100%);
  height: min(920px, calc(100dvh - 44px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px 22px 18px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .35);
}
.sniplify-demo__stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #080808;
}
.sniplify-demo__video {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .sniplify-demo { padding: 10px; }
  .sniplify-demo__panel {
    width: 100%;
    height: calc(100dvh - 20px);
    padding: 15px 14px 13px;
    gap: 12px;
    border-radius: 6px;
  }
}

/* Approved home fidelity rules moved from index.html to keep inline styles out of the CSP. */
/* Home fidelity overrides retained from the approved implementation. */
.page-scroll .laptop {
  width: min(90%, 760px);
  transform: translateY(-4px);
}

.page-scroll .laptop-screen { aspect-ratio: 1.4 / 1; }

.page-scroll .laptop-base {
  width: 116%;
  margin-left: -8%;
}

.page-scroll .hero-project-card--sniplify {
  width: clamp(440px, 31vw, 520px);
  left: -3.5%;
  top: 47.5%;
  transform: translateY(-50%) rotate(-2deg);
  z-index: 2;
}

.page-scroll .hero-project-card--ims {
  width: clamp(440px, 30vw, 500px);
  left: 48.8%;
  top: 47%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.page-scroll .hero-project-card--ucm {
  width: clamp(440px, 31vw, 520px);
  aspect-ratio: 1672 / 941;
  right: -3.5%;
  top: 47.5%;
  transform: translateY(-50%) rotate(2deg);
  z-index: 3;
}

.page-scroll .hero-project-card img {
  object-fit: contain;
  object-position: center;
  background: #f8f6f1;
}

.page-scroll .hero-project-card--ucm img {
  width: 109%;
  height: auto;
  max-width: none;
  object-fit: initial;
  object-position: initial;
  transform: translateX(-4.15%);
  transform-origin: top center;
}

.page-scroll .outline-cta,
.page-scroll .site-nav a::after { transition: none; }

@media (max-width: 1200px) {
  .page-scroll .laptop {
    width: min(90%, 700px);
    transform: translateY(-2px);
  }
  .page-scroll .hero-project-card--sniplify {
    width: min(49vw, 445px);
    left: -2%;
    top: 47.5%;
  }
  .page-scroll .hero-project-card--ims {
    width: min(52vw, 465px);
    left: 49.5%;
    top: 47%;
  }
  .page-scroll .hero-project-card--ucm {
    width: min(49vw, 445px);
    right: -2%;
    top: 47.5%;
  }
}

@media (max-width: 900px) {
  .page-scroll .laptop {
    width: min(88vw, 680px);
    transform: none;
  }
  .page-scroll .laptop-screen { aspect-ratio: 1.48 / 1; }
  .page-scroll .hero-project-card--sniplify {
    width: min(58vw, 360px);
    left: 0;
    top: 47%;
  }
  .page-scroll .hero-project-card--ims {
    width: min(63vw, 390px);
    left: 50%;
    top: 47%;
  }
  .page-scroll .hero-project-card--ucm {
    width: min(58vw, 360px);
    right: 0;
    top: 47%;
  }
}

/* TagoKo gallery: show the complete 9:16 mobile screenshot in the default view. */
.tagoko-gallery[data-tagoko-gallery]:not(.is-zoomed) .tagoko-gallery__image-button {
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.tagoko-gallery[data-tagoko-gallery]:not(.is-zoomed) .tagoko-gallery__image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .tagoko-gallery[data-tagoko-gallery]:not(.is-zoomed) .tagoko-gallery__image-button {
    margin: 0 auto;
  }
}
