:root {
  --porcelain: #faf8f5;
  --sand: #eae3d8;
  --ink: #25283d;
  --brass: #a88a59;
  --brass-light: #d8c5a7;
  --muted: #626370;
  --line: #ddd8d0;
  --story-muted: #d2d2db;
  --story-line: #505261;
  color: var(--ink);
  background: var(--porcelain);
  font-family: Inter, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--porcelain);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--porcelain);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
}

button,
input,
a {
  font: inherit;
  touch-action: manipulation;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 4px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.04;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 18px;
  z-index: 10;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--porcelain);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #25283d1a;
}

.skip-link:focus {
  top: 16px;
}

.access-page {
  display: flex;
  flex-direction: column;
}

.access-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(430px, 0.9fr);
  flex: 1 0 auto;
  width: 100%;
  min-height: min(780px, calc(100dvh - 188px));
}

.story-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  min-width: 0;
  padding: clamp(38px, 5vw, 76px) clamp(30px, 6vw, 96px);
  color: var(--porcelain);
  background: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 14px;
  min-height: 48px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #d0b98f;
  border: 1px solid #bca682;
  border-radius: 50%;
  font:
    italic 36px/1 "Cormorant Garamond",
    Georgia,
    serif;
}

.brand-copy {
  display: block;
}

.brand-title {
  display: block;
  color: var(--porcelain);
  font:
    500 28px/1.1 "Cormorant Garamond",
    Georgia,
    serif;
}

.brand-subtitle {
  display: block;
  margin-top: 5px;
  color: #c4c4cd;
  font-size: 15px;
  line-height: 1.35;
}

.story-copy {
  width: min(100%, 540px);
  margin: auto 0;
}

.eyebrow,
.panel-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--brass-light);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.eyebrow::before,
.panel-kicker::before {
  width: 25px;
  height: 1px;
  flex: 0 0 25px;
  background: var(--brass);
  content: "";
}

.story-copy h1 {
  max-width: 620px;
  margin: 24px 0 28px;
  color: var(--porcelain);
  font-size: clamp(54px, 6.1vw, 88px);
  letter-spacing: -0.045em;
}

.story-copy h1 em {
  color: var(--brass-light);
  font-weight: 400;
}

.story-invitation {
  max-width: 475px;
  color: var(--story-muted);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.78;
}

.story-note {
  max-width: 510px;
  padding-top: 27px;
  color: #cacad4;
  border-top: 1px solid var(--story-line);
  font-size: 16px;
  line-height: 1.7;
}

.story-note strong {
  color: var(--porcelain);
  font-weight: 500;
}

.gate-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(44px, 7vw, 100px) clamp(30px, 7vw, 112px);
  background: var(--porcelain);
}

.gate-card {
  width: min(100%, 520px);
  padding: clamp(32px, 4vw, 58px);
  background: #fffdfa;
  border: 1px solid var(--line);
  box-shadow: 0 22px 70px #25283d0c;
}

.gate-card .panel-kicker {
  color: var(--brass);
}

.gate-card h2 {
  margin-top: 22px;
  color: var(--ink);
  font-size: clamp(43px, 4vw, 60px);
  letter-spacing: -0.035em;
}

.gate-intro {
  max-width: 440px;
  margin-top: 23px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.access-form {
  margin-top: 35px;
}

.field-group {
  min-width: 0;
}

.field-group label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 58px;
  background: var(--porcelain);
  border: 1px solid #bcb9b2;
  border-radius: 3px;
}

.input-wrap:focus-within {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px #a88a5930;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 3px;
  outline: 0;
  font-size: 18px;
}

.toggle-code {
  align-self: center;
  min-width: 62px;
  min-height: 44px;
  margin-right: 6px;
  padding: 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
}

.toggle-code:hover {
  color: var(--ink);
  background: var(--sand);
}

.field-hint,
.access-error {
  margin-top: 9px;
  font-size: 15px;
  line-height: 1.5;
}

.field-hint {
  color: var(--muted);
}

.access-error {
  color: #8e332e;
  font-weight: 600;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 27px;
  padding: 13px 22px;
  color: var(--porcelain);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.submit-button:hover {
  background: #3c4059;
  border-color: #3c4059;
}

.privacy-note {
  max-width: 430px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.book-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 0.8fr);
  align-items: center;
  gap: 25px clamp(24px, 4vw, 64px);
  min-height: 138px;
  padding: 18px clamp(24px, 5vw, 84px);
  background: var(--sand);
  border-top: 1px solid #d1c4b0;
  box-shadow: 0 -5px 25px #25283d08;
}

.book-product {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 20px;
}

.book-product img {
  width: 54px;
  height: 84px;
  flex: 0 0 auto;
  object-fit: contain;
  box-shadow: 3px 4px 9px #25283d22;
}

.book-label {
  margin-bottom: 4px;
  color: #706149;
  font-size: 15px;
  line-height: 1.3;
}

.book-product h2 {
  color: var(--ink);
  font-size: clamp(25px, 2.2vw, 32px);
  line-height: 1.12;
}

.book-authors {
  margin-top: 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.book-action {
  display: flex;
  align-items: center;
  gap: 21px;
}

.book-action p {
  max-width: 190px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.book-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 13px 22px;
  color: var(--porcelain);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.book-link:hover {
  background: #3c4059;
}

.book-link > span[aria-hidden="true"] {
  font-size: 19px;
  line-height: 1;
}

.copyright {
  justify-self: end;
  max-width: 300px;
  color: #706d73;
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 1120px) {
  .access-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1fr);
  }

  .story-panel {
    padding-inline: clamp(28px, 5vw, 55px);
  }

  .gate-panel {
    padding-inline: clamp(24px, 5vw, 58px);
  }

  .gate-card {
    padding: 38px;
  }

  .book-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 28px;
  }

  .copyright {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 17px;
  }

  .access-shell {
    display: block;
    min-height: 0;
  }

  .story-panel {
    gap: 36px;
    padding: 28px 25px 34px;
  }

  .story-copy {
    margin: 10px 0 0;
  }

  .story-copy h1 {
    max-width: 640px;
    margin: 17px 0 18px;
    font-size: clamp(43px, 11vw, 65px);
  }

  .story-invitation {
    max-width: 620px;
    font-size: 17px;
    line-height: 1.65;
  }

  .story-note {
    display: none;
  }

  .gate-panel {
    display: block;
    padding: 25px;
  }

  .gate-card {
    width: min(100%, 620px);
    margin: 0 auto;
    padding: 30px;
  }

  .gate-card h2 {
    font-size: clamp(40px, 9vw, 55px);
  }

  .gate-intro {
    font-size: 17px;
  }

  .book-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 13px 20px;
    padding: 15px 20px 18px;
  }

  .book-product {
    flex: 1 1 280px;
    gap: 13px;
  }

  .book-product img {
    width: 42px;
    height: 65px;
  }

  .book-product h2 {
    font-size: 24px;
  }

  .book-action {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .book-action p {
    display: none;
  }

  .book-link {
    width: 100%;
  }

  .copyright {
    flex-basis: 100%;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .story-panel {
    padding: 23px 20px 29px;
  }

  .brand-title {
    font-size: 27px;
  }

  .brand-subtitle {
    font-size: 14px;
  }

  .story-copy h1 {
    letter-spacing: -0.035em;
  }

  .gate-panel {
    padding: 14px 16px 20px;
  }

  .gate-card {
    padding: 25px 21px 27px;
  }

  .gate-card h2 {
    margin-top: 18px;
    font-size: 40px;
  }

  .gate-intro {
    margin-top: 18px;
  }

  .access-form {
    margin-top: 28px;
  }

  .input-wrap input {
    font-size: 17px;
  }

  .book-footer {
    padding-inline: 16px;
  }

  .book-product h2 {
    font-size: 21px;
  }

  .book-label,
  .book-authors,
  .copyright {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep secondary text readable at every breakpoint. */
.copyright,
.brand-subtitle,
.book-label,
.book-authors {
  font-size: 15px;
}
@media (max-width: 480px) {
  .brand-subtitle,
  .book-label,
  .book-authors,
  .copyright {
    font-size: 15px;
  }
}

/* Supplied Shima portrait, contained by the existing brass circle. */
.brand-mark {
  flex: 0 0 48px;
  overflow: hidden;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
