:root {
  --paper: #eef1f4;
  --paper-2: #e4e9ef;
  --ink: #1e242b;
  --ink-soft: #5a6570;
  --line: rgba(30, 36, 43, 0.16);
  --line-strong: rgba(30, 36, 43, 0.34);
  --plan: #2f5f73;
  --plan-soft: rgba(47, 95, 115, 0.12);
  --brass: #9a7b4f;
  --oak: #b08968;
  --stone: #9aa3a8;
  --linen: #d8d0c4;
  --graphite: #3a4149;
  --surface: rgba(255, 255, 255, 0.55);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

/* —— drafting sheet background —— */
.sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, #f5f7f9 0%, var(--paper) 40%, var(--paper-2) 100%);
}

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(to right, rgba(47, 95, 115, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(47, 95, 115, 0.07) 1px, transparent 1px),
    linear-gradient(to right, rgba(47, 95, 115, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(47, 95, 115, 0.035) 1px, transparent 1px);
  background-size:
    48px 48px,
    48px 48px,
    12px 12px,
    12px 12px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 75%);
  animation: grid-shift 22s linear infinite;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(154, 123, 79, 0.1), transparent 50%),
    radial-gradient(50% 40% at 10% 80%, rgba(47, 95, 115, 0.1), transparent 55%);
}

@keyframes grid-shift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-48px, -48px, 0);
  }
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding:
    calc(12px + var(--safe-top))
    18px
    calc(22px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
}

.view {
  display: none;
  animation: sheet-in 0.5s var(--ease) both;
}

.view.is-active {
  display: block;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translate3d(12px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  animation: rise 0.7s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— title block (architectural stamp) —— */
.titleblock {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  margin-bottom: 14px;
}

.titleblock__meta,
.titleblock__brand {
  padding: 10px 12px;
}

.titleblock__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-content: center;
  border-right: 1px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.titleblock__brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.titleblock__brand span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-soft);
}

.topnav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.topnav button {
  padding: 10px 4px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  transition: color 0.2s ease, background 0.2s ease;
}

.topnav button:last-child {
  border-right: 0;
}

.topnav button:active,
.topnav button:hover {
  color: var(--ink);
  background: rgba(47, 95, 115, 0.08);
}

/* —— hero draft —— */
.hero {
  display: grid;
  gap: 18px;
}

.hero__stage {
  position: relative;
  margin: 0 -18px;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  overflow: hidden;
}

.draft {
  display: block;
  width: 100%;
  height: auto;
}

.draft .draw {
  stroke: var(--plan);
  stroke-width: 1.4;
  stroke-linecap: square;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: stroke-draw 2.2s var(--ease) forwards;
}

.draft .draw--slow {
  animation-duration: 2.8s;
}

.draft .draw--delay {
  animation-delay: 0.35s;
}

.draft .soft {
  stroke: rgba(47, 95, 115, 0.45);
  stroke-width: 1;
  fill: rgba(47, 95, 115, 0.06);
  opacity: 0;
  animation: fade-in 0.8s ease forwards 1.2s;
}

.draft .dash {
  stroke: var(--brass);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0;
  animation: fade-in 0.6s ease forwards 1.5s;
}

.draft .dim {
  stroke: var(--ink-soft);
  stroke-width: 0.8;
  opacity: 0;
  animation: fade-in 0.6s ease forwards 1.1s;
}

.draft .anno {
  fill: var(--ink-soft);
  font-size: 8px;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fade-in 0.6s ease forwards 1.3s;
}

.draft .anno--v {
  writing-mode: sideways-lr;
  transform: rotate(180deg);
}

.draft .north circle,
.draft .section circle {
  stroke: var(--ink);
  stroke-width: 1;
  fill: rgba(255, 255, 255, 0.5);
}

.draft .north path,
.draft .section path {
  stroke: var(--ink);
  stroke-width: 1.2;
  fill: none;
}

.draft .north text,
.draft .section text {
  fill: var(--ink);
  font-size: 8px;
  font-family: var(--font-body);
}

.draft .north,
.draft .section {
  opacity: 0;
  animation: fade-in 0.7s ease forwards 1.6s;
}

@keyframes stroke-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

.elev {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 12px;
}

.elev__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.elev__skyline {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 28px;
  border-bottom: 1px solid var(--line-strong);
}

.elev__skyline i {
  display: block;
  flex: 1;
  background: linear-gradient(180deg, rgba(47, 95, 115, 0.2), rgba(47, 95, 115, 0.55));
  border: 1px solid rgba(47, 95, 115, 0.35);
  border-bottom: 0;
  transform-origin: bottom;
  animation: elevate 3.2s var(--ease) infinite alternate;
}

.elev__skyline i:nth-child(1) { height: 45%; animation-delay: 0s; }
.elev__skyline i:nth-child(2) { height: 78%; animation-delay: 0.15s; }
.elev__skyline i:nth-child(3) { height: 58%; animation-delay: 0.3s; }
.elev__skyline i:nth-child(4) { height: 90%; animation-delay: 0.1s; background: linear-gradient(180deg, rgba(154, 123, 79, 0.25), rgba(154, 123, 79, 0.55)); border-color: rgba(154, 123, 79, 0.4); }
.elev__skyline i:nth-child(5) { height: 64%; animation-delay: 0.25s; }

@keyframes elevate {
  from {
    transform: scaleY(0.92);
  }
  to {
    transform: scaleY(1);
  }
}

.kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plan);
  font-weight: 600;
}

.headline {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 7vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* neutral drawing marks */
.marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 18px 0 4px;
}

.mark {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 4px 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink-soft);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.mark svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.2;
}

.mark span {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mark:nth-child(odd) {
  animation: mark-pulse 4.5s ease-in-out infinite;
}

.mark:nth-child(even) {
  animation: mark-pulse 4.5s ease-in-out infinite 0.6s;
}

@keyframes mark-pulse {
  0%,
  100% {
    border-color: var(--line-strong);
  }
  50% {
    border-color: rgba(47, 95, 115, 0.45);
    color: var(--plan);
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn--primary {
  background: var(--ink);
  color: #f3f6f8;
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--block {
  width: 100%;
  margin-top: 8px;
}

.home-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.foot-mark {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 8px;
  border: 1px solid var(--line);
}

/* panels */
.panel-head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--plan);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.back {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  position: relative;
  background: var(--surface);
}

.back::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 9px;
  height: 9px;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateX(2px) rotate(45deg);
}

.stack {
  display: grid;
  gap: 12px;
}

.pkg {
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.pkg:hover,
.pkg:focus-visible,
.pkg.is-selected {
  transform: translateY(-2px);
  border-color: var(--plan);
}

.pkg--accent {
  background:
    linear-gradient(135deg, rgba(47, 95, 115, 0.1), transparent 40%),
    var(--surface);
}

.pkg__code {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
  font-weight: 600;
}

.pkg__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.pkg h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.pkg__tag {
  margin: 8px 0 12px;
  color: var(--ink-soft);
}

.pkg ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

.pkg li {
  padding-left: 16px;
  position: relative;
}

.pkg li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--plan);
}

.pkg__bar {
  height: 1px;
  margin: 0 0 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 8px,
    transparent 8px 14px
  );
}

/* works */
.works {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.work {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.work__canvas {
  position: relative;
  height: 140px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(to right, rgba(47, 95, 115, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(47, 95, 115, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

.work__frame {
  position: absolute;
  inset: 18px 22px;
  border: 1px solid rgba(30, 36, 43, 0.35);
}

.work__line {
  position: absolute;
  background: rgba(47, 95, 115, 0.45);
}

.work__line--h {
  left: 22px;
  right: 22px;
  top: 55%;
  height: 1px;
}

.work__line--v {
  top: 18px;
  bottom: 18px;
  left: 48%;
  width: 1px;
}

.work__zone {
  position: absolute;
  left: 30px;
  top: 30px;
  width: 36%;
  height: 28%;
  border: 1px dashed rgba(30, 36, 43, 0.28);
  background: rgba(255, 255, 255, 0.35);
}

.work__zone--alt {
  left: auto;
  right: 30px;
  top: 48%;
  width: 30%;
  height: 32%;
}

.work__canvas--b .work__line--h {
  top: 40%;
}

.work__canvas--c .work__line--v {
  left: 62%;
}

.work__meta {
  padding: 12px 14px;
}

.work__meta h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.work__meta p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.contact-card {
  display: grid;
  gap: 10px;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.contact-row span {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-row strong {
  font-weight: 600;
}

.contact-note {
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.linkish {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--plan);
  padding-bottom: 2px;
}

.timeline {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 1px solid var(--line-strong);
}

.timeline li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 0 0 18px 14px;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  background: var(--paper);
  border: 1px solid var(--plan);
}

.timeline span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--plan);
}

.timeline h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.timeline p {
  margin: 0;
  color: var(--ink-soft);
}

.faq details {
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
  padding: 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  padding: 14px 36px 14px 14px;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--plan);
  font-weight: 500;
  font-size: 1.1rem;
}

.faq details[open] summary::after {
  content: "–";
}

.faq .answer {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  white-space: pre-line;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.progress {
  margin: 0 0 16px;
}

.progress__track {
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--plan);
  transition: width 0.45s var(--ease);
  position: relative;
}

.progress__bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--brass);
  border: 1px solid var(--ink);
  transform: translate(50%, -50%) rotate(45deg);
}

.progress__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.progress__ticks i {
  width: 1px;
  height: 6px;
  background: var(--line-strong);
}

.hint {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 72px;
  position: relative;
  z-index: 2;
}

.opt {
  text-align: left;
  padding: 14px 16px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(47, 95, 115, 0.15);
  cursor: pointer;
  width: 100%;
}

.opt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.opt.is-on {
  border-color: var(--plan);
  background: var(--plan-soft);
}

.opt.is-on::before {
  background: var(--plan);
}

.opt:active {
  transform: scale(0.99);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.field input:focus {
  border-color: var(--plan);
}

.brief-actions {
  display: flex;
  gap: 10px;
  position: sticky;
  bottom: calc(8px + var(--safe-bottom));
  padding-top: 8px;
  z-index: 3;
  background: linear-gradient(180deg, transparent, var(--paper) 30%);
}

.brief-actions .btn--primary {
  flex: 1;
}

.brief-actions .btn--primary:disabled {
  opacity: 0.45;
}

.done {
  min-height: calc(100dvh - 70px);
  display: grid;
  align-content: center;
  gap: 4px;
}

.summary {
  margin: 16px 0 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.summary div:last-child {
  border-bottom: 0;
}

.summary span:first-child {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.summary span:last-child {
  text-align: right;
  font-weight: 500;
  max-width: 60%;
}

.brief-preview {
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-soft);
  max-height: 220px;
  overflow: auto;
}

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

  .reveal,
  .draft .draw,
  .draft .soft,
  .draft .dash,
  .draft .dim,
  .draft .anno,
  .draft .north,
  .draft .section {
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
}
