:root {
  color-scheme: light;
  --page: #f9f7f1;
  --ink: #22211f;
  --muted: #56524f;
  --line: #dcd7cb;
  --accent: #4938c7;
  --bright: #fffdf9;
  --pink: #f0d5dc;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }

.shell { width: min(100% - 3.25rem, 76rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 10;
  inset: 0 auto auto 0;
  padding: 0.8rem 1.1rem;
  transform: translateY(-110%);
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 5.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  width: fit-content;
  display: inline-block;
  color: var(--ink);
  font-weight: 850;
  line-height: 1;
  font-size: clamp(1rem, 2vw, 1.45rem);
  letter-spacing: -0.075em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-dot { color: var(--accent); }
.site-nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 1.75rem; }
.site-nav a, .site-footer nav a, .back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-footer nav a:hover, .back-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.28em; }

.hero {
  min-height: 32rem;
  display: grid;
  grid-template-columns: minmax(0, 1.43fr) minmax(17rem, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  padding-block: clamp(3.25rem, 7vw, 6.75rem);
}
.eyebrow {
  color: var(--accent);
  margin-bottom: 1.45rem;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 720;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  font-weight: 850;
  letter-spacing: -0.089em;
  line-height: 0.97;
}
.hero h1 span { display: block; }
.hero-accent { color: var(--accent); }
.hero-description {
  max-width: 28rem;
  margin-block: 1.65rem 1.65rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  line-height: 1.65;
  word-break: keep-all;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: fit-content;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 0.45rem;
  color: white;
  background: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--accent); border-color: var(--accent); }
.button-secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.button-secondary:hover { background: var(--bright); border-color: var(--accent); color: var(--accent); }
.button span { font-size: 1.15rem; line-height: 1; }

.hero-app {
  position: relative;
  display: block;
  min-height: 26rem;
  overflow: hidden;
  border: 1px solid #e0b7c4;
  border-radius: 1.2rem;
  isolation: isolate;
  background: radial-gradient(ellipse at 85% 5%, #fae8ed, transparent 54%), var(--pink);
  text-decoration: none;
}
.hero-app-copy {
  position: absolute;
  z-index: 1;
  inset: auto 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #fff;
  border-radius: 0.85rem;
  background: #fffaf8;
  box-shadow: 0 15px 30px #553a451a;
}
.hero-app-copy .app-icon { width: 3.3rem; flex: 0 0 3.3rem; }
.hero-app-copy strong { display: block; font-size: 1.06rem; }
.hero-app-copy span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.84rem; }
.hero-app-copy span span { display: inline; }
.hero-app:hover .hero-app-copy span { color: var(--accent); }
.hero-app-image {
  position: absolute;
  inset: 1.7rem 13% auto auto;
  width: min(67%, 17rem);
  padding: 0.35rem;
  transform: rotate(8deg);
  border-radius: 1.45rem;
  box-shadow: 0.6rem 1.2rem 3rem #4c1b3450;
  background: #281f27;
}
.hero-app-image img { border-radius: 1.12rem; }
.app-icon { align-self: start; border-radius: 22%; border: 1px solid #b5818d44; }

.section { border-top: 1px solid var(--line); padding-block: clamp(2.35rem, 5vw, 5rem); }
.section-heading h2, .project h2 {
  font-weight: 830;
  font-size: clamp(2.4rem, 4.9vw, 4.15rem);
  line-height: 1.05;
  letter-spacing: -0.075em;
}
.section-heading { margin-bottom: clamp(1.3rem, 3vw, 2rem); }
.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem clamp(1rem, 3vw, 1.75rem);
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--bright);
}
.app-card h3 { font-size: clamp(1.3rem, 2.7vw, 1.9rem); letter-spacing: -0.055em; }
.app-card p, .project p, .product-details p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.65;
  word-break: keep-all;
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1rem 2rem;
}
.project p { max-width: 32rem; }
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  padding-block: 1.6rem 2rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin-top: 0.6rem; color: var(--muted); font-size: 0.85rem; }

.product { padding-top: clamp(0.9rem, 2.7vw, 2rem); }
.back-link { color: var(--accent); }
.product-intro {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding-block: clamp(1.4rem, 3vw, 2.5rem) clamp(2.1rem, 5vw, 4.4rem);
}
.product-intro .app-icon { width: clamp(4.2rem, 11vw, 7.25rem); align-self: center; flex-shrink: 0; }
.product-intro h1 { font-size: clamp(2rem, 5.75vw, 4.6rem); line-height: 1.13; letter-spacing: -0.09em; word-break: keep-all; }
.product-intro p { margin-top: 0.85rem; max-width: 29rem; color: var(--muted); font-size: clamp(0.96rem, 1.55vw, 1.12rem); line-height: 1.6; word-break: keep-all; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.6rem, 2vw, 1.5rem); padding-bottom: clamp(2.2rem, 5vw, 4rem); }
.gallery figure { margin: 0; padding: clamp(0.65rem, 2vw, 1.4rem); border-radius: 0.95rem; background: #f2dbe2; text-align: center; }
.gallery figure:nth-child(2) { background: #e9e5f2; }
.gallery figure:nth-child(3) { background: #e2ece3; }
.gallery img { width: min(86%, 16rem); margin-inline: auto; border: 1px solid #302a341a; border-radius: clamp(0.7rem, 2.8vw, 1.35rem); box-shadow: 0 0.5rem 1.3rem #21133524; }
.gallery figcaption { padding-top: 0.9rem; font-size: clamp(0.95rem, 2.2vw, 1.15rem); font-weight: 720; }
.product-details { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem 2rem; }
.product-details h2 { font-size: clamp(1.45rem, 3.25vw, 2.45rem); letter-spacing: -0.055em; }
.product-links { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.document { max-width: 46rem; margin-inline: auto; padding-block: clamp(2rem, 6vw, 4.6rem); }
.document h1 { margin-top: 0.35rem; font-size: clamp(2.25rem, 7vw, 3.8rem); line-height: 1.15; letter-spacing: -0.08em; }
.document h2 { margin-top: 2rem; margin-bottom: 0.85rem; letter-spacing: -0.04em; font-size: clamp(1.22rem, 3vw, 1.5rem); }
.document p, .document ul { color: var(--muted); font-size: 1rem; line-height: 1.78; }
.document p + p { margin-top: 0.8rem; }
.document .intro { margin-top: 0.9rem; font-size: 1.06rem; }
.document ul { margin-block: 0.8rem 1.25rem; padding-inline-start: 1.2rem; }
.document li + li { margin-top: 0.55rem; }
.document strong { color: var(--ink); }
.document a:not(.back-link) { color: var(--accent); font-weight: 650; text-underline-offset: 0.22em; overflow-wrap: anywhere; }

@media (max-width: 850px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(13rem, 0.9fr); }
  .hero h1 { font-size: clamp(2.9rem, 6.45vw, 4.6rem); }
  .hero-app { min-height: 21rem; }
  .hero-app-image { width: 69%; inset: 1.45rem 12% auto auto; }
}

@media (max-width: 650px) {
  .shell { width: calc(100% - 2rem); }
  .site-header { flex-wrap: wrap; justify-content: start; min-height: 0; gap: 0.2rem 1.3rem; padding-block: 0.9rem 0.4rem; }
  .site-nav, .site-footer nav { gap: 0.2rem 1.1rem; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2.45rem 2.6rem; }
  .hero h1 { font-size: clamp(2.85rem, 10vw, 4.2rem); }
  .hero-app { min-height: 21.5rem; }
  .hero-app-image { width: min(52%, 12.8rem); inset: 1.25rem 15% auto auto; }
  .project { grid-template-columns: 1fr; }
  .app-card { grid-template-columns: auto minmax(0, 1fr); }
  .app-card .app-icon { width: 3.65rem; }
  .app-card .button { grid-column: 2; }
  .gallery { grid-template-columns: repeat(auto-fit, minmax(9.4rem, 1fr)); }
}

@media (max-width: 385px) {
  .site-nav { gap: 0.2rem 0.9rem; }
  .app-card { gap: 0.8rem; }
  .app-card .button { grid-column: 1 / -1; }
  .product-intro { align-items: flex-start; }
  .product-intro .app-icon { width: 3.45rem; }
  .product-intro h1 { font-size: 1.85rem; }
  .gallery img { width: min(76%, 12rem); }
}
