@font-face {
  font-family: "Be Vietnam";
  src: url("/fonts/be-vietnam-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam";
  src: url("/fonts/be-vietnam-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #103b3a;
  --deep: #123e3d;
  --mist: #edf3ee;
  --water: #c7e0e4;
  --leaf: #d8e6d7;
  --sun: #f6d88c;
  --line: #8da8a0;
  --focus: #a14419;
  --wrap: min(100% - 2 * clamp(20px, 5vw, 78px), 1280px);
  --hubcom-surface: #17352e;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 18px; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 16px/1.65 "Be Vietnam", sans-serif;
}
::selection { color: var(--ink); background: var(--sun); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 6vw, 5.6rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.25vw, 4.15rem); font-weight: 400; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2.45rem); font-weight: 400; }
p { max-width: 65ch; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
button, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
main:focus-visible, section:focus-visible { outline-offset: -4px; }
figure figcaption { margin-top: .65rem; font-size: .875rem; }
.wrap { width: var(--wrap); margin-inline: auto; }
.button, .language, .menu, .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  line-height: 1.4;
}
.button {
  padding: .8rem 1.15rem;
  border: 1px solid transparent;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button.sun { background: var(--sun); color: var(--ink); }
.button.sun:hover { background: #ffe5a7; }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #205653; }
.button.outline { background: transparent; border-color: var(--ink); }
.button.outline:hover { background: #d3e4da; }
.skip { position: absolute; z-index: 3; top: -100px; left: 12px; padding: 12px 20px; background: var(--sun); }
.skip:focus { top: 8px; }

.site-header {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 34px);
  min-height: 70px;
  background: var(--mist);
  padding: max(9px, env(safe-area-inset-top)) max(4vw, env(safe-area-inset-right)) 9px max(4vw, env(safe-area-inset-left));
  border-bottom: 1px solid #a5bbb1;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-right: auto;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
}
.site-header nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: .9rem;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav [aria-current] { text-decoration: underline; }
.language, .menu {
  min-width: 46px;
  padding: .5rem .62rem;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: .875rem;
  text-decoration: none;
}
.menu { display: none; }
.language:hover, .menu:hover { background: var(--leaf); }
.storage-alert { max-width: none; background: #f9e8bb; padding: 12px max(4vw, 20px); }

.hero {
  min-height: clamp(33rem, 53vw, 46rem);
  display: flex;
  align-items: center;
  background-color: #163e3c;
  background-image: linear-gradient(90deg, #092b2be8 0%, #0b3332c7 29%, #0a313146 58%, transparent 76%),
    url("/images/project-overview.jpg");
  background-size: cover;
  background-position: center 60%;
  color: #fffdf8;
}
.hero-copy { width: var(--wrap); margin-inline: auto; padding-block: 4rem; }
.hero h1 { max-width: 9.8ch; }
.hero p { max-width: 33ch; margin: 1.25rem 0 1.6rem; font-size: clamp(1rem, 1.35vw, 1.2rem); }
.hero :focus-visible, .closing :focus-visible, .scene :focus-visible { outline-color: var(--sun); }

.day { padding-top: clamp(3.5rem, 6vw, 6rem); }
.day-head, .section-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}
.day-head h2, .section-head h2 { max-width: 14ch; }
.day-head p, .section-head p { max-width: 44ch; margin-top: .8rem; }
.time-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.time-controls button {
  min-height: 62px;
  min-width: clamp(88px, 8vw, 128px);
  padding: .55rem .7rem;
  border: 1px solid #567b72;
  background: transparent;
  line-height: 1.35;
  font-size: .9rem;
  text-align: left;
}
.time-controls span { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.time-controls button:hover { background: var(--leaf); }
.time-controls [aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.scene { display: grid; grid-template-columns: 1.55fr 1fr; background: var(--deep); color: #fffdf8; }
.scene-photo { min-height: clamp(21rem, 40vw, 38rem); background: var(--photo) center / cover; }
.scene-copy {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: clamp(24px, 5vw, 80px);
}
.scene-copy time { color: var(--sun); font-size: clamp(1.35rem, 2vw, 2.1rem); font-variant-numeric: tabular-nums; }
.scene-copy h3 { margin: .65rem 0 1rem; }
.scene-copy p { max-width: 38ch; margin-bottom: 1.1rem; }
.scene-copy a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; }
.scene-reveal { animation: scene-reveal .42s cubic-bezier(.16,1,.3,1); }
@keyframes scene-reveal { from { clip-path: inset(0 2% 0 0); filter: saturate(.78); } to { clip-path: inset(0); } }

.map-section, .apartments { padding-block: clamp(3.6rem, 8vw, 8rem); }
.map-section { border-bottom: 1px solid var(--line); }
.map-grid { display: grid; grid-template-columns: 1.65fr 1fr; align-items: stretch; gap: clamp(18px, 4vw, 64px); }
.site-plan {
  position: relative;
  min-height: clamp(250px, 31vw, 425px);
  background: var(--leaf);
  border: 1px solid #9eb8ad;
  overflow: hidden;
}
.river-shape {
  position: absolute;
  inset: 0 0 auto;
  height: 31%;
  border-radius: 0 0 58% 24% / 0 0 46% 22%;
  background: var(--water);
  border-bottom: 2px solid #83adb3;
  padding: 5% 9%;
  color: #21535a;
}
.shore { position: absolute; inset: 33% 7% 11%; border: 1px solid #799e88; border-radius: 22% 24% 5% 5%; }
.building { position: absolute; top: 49%; width: 22%; height: 27%; background: #77a294; border: 1px solid #496f66; }
.building.west { left: 12%; }
.building.east { right: 12%; }
.route-line { position: absolute; top: 25%; left: 47%; width: 32%; height: 52%; border-left: 2px dashed #527a6e; border-bottom: 2px dashed #527a6e; }
.map-point {
  position: absolute;
  z-index: 1;
  min-height: 44px;
  padding: .45rem .55rem;
  background: #fff;
  border: 1px solid var(--ink);
  font-weight: 700;
  font-size: clamp(.78rem, 1.5vw, 1rem);
  line-height: 1.35;
}
.map-point[data-space="river"] { top: 26%; left: 9%; }
.map-point[data-space="courtyard"] { top: 49%; left: 50%; transform: translateX(-50%); }
.map-point[data-space="homes"] { right: 8%; bottom: 11%; }
.map-point:hover { background: #fce8b7; }
.map-point[aria-pressed="true"] { background: var(--ink); color: #fff; }
.map-detail { align-self: center; border-top: 1px solid var(--line); padding: 1.4rem 0 .5rem; }
.map-detail h3 { margin-bottom: .8rem; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 54px); }
.plan-card { min-width: 0; background: #e0ebdf; display: flex; flex-direction: column; }
.plan-card .layout-figure { padding: clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.plan-card-copy { padding: clamp(18px, 3vw, 36px); flex: 1; display: flex; flex-direction: column; align-items: start; }
.plan-card-copy .area { margin: .4rem 0 .6rem; }
.plan-card-copy p + p { margin-bottom: 1.1rem; }
.plan-card-copy .button { margin-top: auto; }
.floor-plan {
  display: grid;
  grid-template-areas:
    "balcony balcony balcony"
    "living hall first"
    "living hall first"
    "living hall second"
    "living hall second"
    "entry hall bath"
    "entry hall bath";
  grid-template-columns: 1.2fr .55fr 1.1fr;
  grid-auto-rows: minmax(clamp(29px, 3.15vw, 46px), auto);
  gap: 1px;
  padding: 1px;
  background: #557a70;
}
.floor-plan.has-third {
  grid-template-areas:
    "balcony balcony balcony"
    "living hall first"
    "living hall first"
    "living hall second"
    "bath hall second"
    "bath hall third"
    "entry hall third";
}
.room { display: grid; place-items: center; background: #fffdf4; padding: .25rem; text-align: center; font-size: clamp(.72rem, 1.5vw, 1rem); line-height: 1.25; }
.balcony { grid-area: balcony; background: var(--water); }
.living { grid-area: living; background: #fffdf4; }
.hall { grid-area: hall; background: var(--leaf); }
.bed-one { grid-area: first; }
.bed-two { grid-area: second; }
.bed-three { grid-area: third; background: #f6e9c6; }
.bath { grid-area: bath; }
.entry { grid-area: entry; background: #e3eee2; }

.closing {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  color: #fffdf8;
  background: linear-gradient(90deg, #092b2bf5 0%, #092b2bd6 46%, #092b2b70 100%),
    url("/images/project-evening.jpg") center 56% / cover;
}
.closing h2 { max-width: 16ch; }
.closing p { max-width: 42ch; margin: 1rem 0 1.35rem; }
.subpage { padding-block: clamp(1.75rem, 5vw, 5rem) clamp(3rem, 7vw, 7rem); }
.subheading { margin: 1rem 0 2rem; }
.subheading h1 { font-size: clamp(2.3rem, 5vw, 4.8rem); max-width: 17ch; }
.subheading p { margin-top: 1rem; max-width: 49ch; }
.apartment-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 7vw, 90px); }
.apartment-grid .layout-figure { background: #e0ebdf; padding: clamp(15px, 3.5vw, 48px); }
.apartment-notes { align-self: center; }
.apartment-notes h2 { font-size: clamp(1.45rem, 3vw, 2.4rem); margin-bottom: .5rem; }
.apartment-notes p + h2 { margin-top: 1.5rem; }
.final-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.visit-page { max-width: 960px; }
#visit-form, .summary { padding: clamp(18px, 4vw, 44px); background: #e0ebdf; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
label { display: block; font-weight: 700; }
select, textarea { display: block; min-height: 48px; width: 100%; background: #fffdf8; border: 1px solid #557a70; padding: .65rem; border-radius: 0; font-weight: 400; }
label select, textarea { margin-top: .45rem; }
textarea { resize: vertical; caret-color: var(--ink); margin-bottom: 1rem; }
textarea::placeholder { color: #45655c; }
.error { margin: .65rem 0 1rem; color: #803617; }
.error a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.summary { margin-top: 1.5rem; background: #fffdf8; }
.summary h2 { margin-bottom: .8rem; font-size: clamp(1.9rem, 4vw, 3rem); }
.summary dl { border-block: 1px solid var(--line); margin: 1rem 0; padding: .8rem 0; }
.summary dt { font-weight: 700; }
.summary dd + dt { margin-top: .55rem; }
.summary h3 { margin-bottom: .4rem; font-size: 1.35rem; }
.literal-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.footer { width: var(--wrap); margin-inline: auto; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
.footer-brand { display: inline-flex; min-height: 44px; align-items: center; }

@media (max-width: 810px) {
  .site-header { flex-wrap: wrap; }
  .site-header nav { width: 100%; order: 4; flex-wrap: wrap; }
  .enhanced .menu { display: inline-flex; }
  .enhanced .site-header nav { display: none; }
  .enhanced .site-header nav.open { display: flex; flex-direction: column; align-items: stretch; gap: 1px; }
  .site-header nav a { border-top: 1px solid #a5bbb1; }
  .day-head, .section-head { display: block; }
  .time-controls { margin-top: 1.1rem; }
}

@media (max-width: 630px) {
  .site-header { gap: 9px; padding-inline: max(14px, env(safe-area-inset-left)); }
  .hero {
    min-height: clamp(28rem, 108vw, 36rem);
    align-items: start;
    background-image: linear-gradient(180deg, #092b2bf2 0%, #0a3131d1 38%, #0a313125 67%, transparent 84%),
      url("/images/project-overview.jpg");
    background-position: 68% 64%;
  }
  .hero-copy { padding-block: 1.9rem 1rem; }
  .hero h1 { max-width: 12ch; font-size: clamp(2.3rem, 10vw, 3.6rem); }
  .hero p { margin-block: .9rem 1.1rem; }
  .day-head, .section-head { margin-bottom: 1.5rem; }
  .time-controls { gap: .35rem; }
  .time-controls button { min-width: 0; padding-inline: .42rem; }
  .scene, .map-grid, .plan-grid, .apartment-grid, .form-row { grid-template-columns: 1fr; }
  .scene-photo { min-height: 0; aspect-ratio: 1.36; }
  .scene-copy { padding: 1.4rem max(20px, 5vw) 1.65rem; }
  .map-grid { gap: 1.2rem; }
  .plan-grid { gap: 1.1rem; }
  .plan-card-copy h3 { font-size: 1.65rem; }
  .form-row { gap: .9rem; }
  .final-actions > * { width: 100%; }
}

@media (min-width: 631px) and (max-height: 480px) {
  .hero { min-height: 22rem; align-items: start; }
  .hero-copy { padding-block: 1.5rem; }
  .hero h1 { font-size: clamp(2.3rem, 5.3vw, 3rem); }
  .hero p { margin-block: .65rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-reveal { animation: none; }
}
