/* chiscoe.com
   Colours come from the save-the-date (cream + blue) and the green palette.
   Change them here and the whole site follows. */
@font-face { font-family: "Caveat Brush"; src: url("fonts/caveat-brush-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --cream: #F7EDE6;
  --paper: #FCF7F2;
  --blue: #1F4EC0;
  --blue-deep: #173A8F;
  --olive: #3D4127;
  --moss: #5B6341;
  --sage: #8C9575;
  --sage-light: #C5CEB6;
  --sage-pale: #E3E7D8;
  --ink: #2B2E22;

  --hand: "Caveat Brush", "Bradley Hand", "Segoe Print", cursive;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", "Andale Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--hand); font-weight: 400; color: var(--blue); line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.8rem, 7vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 2.7rem); margin-top: 3.2rem; }
h3 { font-size: 1.6rem; margin-top: 2rem; color: var(--moss); }
p { margin: 0.8rem 0 0; }
ul, ol { margin: 0.8rem 0 0; padding-left: 1.2rem; }
li { margin-top: 0.4rem; }
li::marker { color: var(--sage); }
strong { font-weight: 600; }

/* The spaced capitals from the save-the-date */
.caps {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Password screen ---------- */
.gate {
  min-height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 0;
  text-align: center;
}
.locked .gate { display: flex; }
.locked .site-header, .locked main, .locked .site-footer { display: none; }
.gate .names { width: min(420px, 82vw); margin: 1rem auto 1.4rem; }
.gate form { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }
.gate input { width: 15rem; text-align: center; }
.gate .msg { min-height: 1.6rem; color: #A3341F; font-size: 0.95rem; }
.gate .skyline { width: min(760px, 100%); margin-top: 2.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream);
  border-bottom: 2px solid var(--sage-light);
}
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 0.55rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 0.2rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--olive);
  padding: 0.45rem 0.6rem; border-radius: 999px;
}
.nav a:hover { background: var(--sage-pale); color: var(--olive); }
.nav a[aria-current="page"] { background: var(--sage-light); }
.nav a.rsvp { background: var(--blue); color: var(--cream); padding-inline: 1rem; margin-left: 0.3rem; }
.nav a.rsvp:hover, .nav a.rsvp[aria-current="page"] { background: var(--blue-deep); color: var(--cream); }
.menu-btn { display: none; }

@media (max-width: 980px) {
  .menu-btn {
    display: inline-flex; background: none; border: 2px solid var(--olive); color: var(--olive);
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 2px solid var(--sage-light);
    flex-direction: column; align-items: stretch; padding: 0.6rem 1.25rem 1.1rem;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 0.9rem; padding: 0.75rem 0.9rem; }
  .nav a.rsvp { margin: 0.4rem 0 0; text-align: center; }
}

/* ---------- Pages ---------- */
.page { display: none; }
.page.current { display: block; }
.wrap { max-width: 760px; margin: 0 auto; padding: 3rem 1.25rem 4.5rem; }
.wrap.wide { max-width: 1060px; }
.lede { font-size: 1.15rem; max-width: 60ch; margin-top: 1rem; }
.page-top { background: var(--sage-pale); border-bottom: 2px solid var(--sage-light); }
.page-top .wrap { padding-top: 2.6rem; padding-bottom: 2.2rem; }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 3.2rem 1.25rem 0; }
.hero .names { width: min(640px, 88vw); margin: 1.1rem auto 1.3rem; }
.hero .caps { display: block; line-height: 2; }
.hero .when { font-size: 1rem; }
.hero .skyline { width: min(980px, 100%); margin: 2.2rem auto 0; }
.harbour { background: var(--moss); color: var(--cream); text-align: center; padding: 2.4rem 1.25rem 2.8rem; }
.harbour p { max-width: 54ch; margin: 0 auto; font-size: 1.12rem; }
.harbour .days { font-family: var(--hand); font-size: 2rem; color: var(--sage-light); margin-bottom: 0.4rem; }
.actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

.btn {
  display: inline-block; cursor: pointer; border: 2px solid var(--blue);
  background: var(--blue); color: var(--cream);
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 0.8rem 1.5rem; border-radius: 999px;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--cream); }
.btn.quiet { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn.quiet:hover { background: var(--cream); color: var(--olive); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }

.event { background: var(--paper); border: 2px solid var(--sage-light); border-radius: 18px; padding: 1.6rem 1.6rem 1.8rem; }
.event h3, .event h2 { margin-top: 0.3rem; color: var(--blue); font-size: 2rem; }
.event .caps { color: var(--moss); }

/* ---------- Content pieces ---------- */
.note {
  background: var(--sage-pale); border-left: 6px solid var(--sage);
  border-radius: 0 14px 14px 0; padding: 1rem 1.2rem; margin-top: 1.4rem;
}
.note p:first-child { margin-top: 0; }
.note.blue { background: #E6ECFA; border-left-color: var(--blue); }

.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 3rem; margin-top: 1rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -0.1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--blue); color: var(--cream);
  font-family: var(--hand); font-size: 1.4rem; line-height: 2.1rem; text-align: center;
}

table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--sage-light); vertical-align: top; }
th { font-family: var(--mono); font-weight: 400; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--moss); }
td:first-child { font-weight: 600; }

dl.menu { margin: 1rem 0 0; }
dl.menu dt { font-weight: 600; margin-top: 0.9rem; }
dl.menu dd { margin: 0.1rem 0 0; }

/* Hong Kong 101 layout: jump list beside the text */
.guide { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 3rem; align-items: start; }
.jump { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 0.15rem; }
.jump button {
  background: none; border: 0; text-align: left; cursor: pointer; color: var(--olive);
  font-family: var(--body); font-size: 0.98rem; padding: 0.45rem 0.8rem; border-radius: 10px;
}
.jump button:hover { background: var(--sage-pale); }
.guide .text > h2:first-child { margin-top: 0; }
.guide .text { max-width: 720px; }
@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 1.5rem; }
  .jump { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .jump button { background: var(--sage-pale); border-radius: 999px; padding: 0.45rem 0.9rem; }
}

.things { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.3rem; margin-top: 2rem; }
.things .event h3 { font-size: 1.8rem; }

details { border-bottom: 1px solid var(--sage-light); padding: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; }
details summary::marker { color: var(--blue); }

/* ---------- RSVP form ---------- */
form.rsvp-form { margin-top: 2rem; }
.field { margin-top: 1.4rem; }
.field > label, fieldset legend { display: block; font-weight: 600; margin-bottom: 0.35rem; padding: 0; }
.hint { font-size: 0.92rem; color: var(--moss); margin: 0 0 0.4rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--paper); border: 2px solid var(--sage-light); border-radius: 12px;
  padding: 0.7rem 0.9rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; }
textarea { min-height: 5.5rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 1.4rem 0 0; }
.choice { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.5rem; font-weight: 400; }
.choice input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--blue); flex: none; }
.form-msg { margin-top: 1.2rem; font-weight: 600; min-height: 1.6rem; }
.form-msg.ok { color: var(--moss); }
.form-msg.bad { color: #A3341F; }

/* ---------- Footer ---------- */
.site-footer { background: var(--olive); color: var(--sage-light); text-align: center; padding: 2.5rem 1.25rem 0; }
.site-footer .names { width: 210px; margin: 0 auto 0.8rem; }
.site-footer .caps { color: var(--sage-light); }
.site-footer .skyline { width: min(720px, 100%); margin: 2rem auto 0; opacity: 0.85; }
