:root {
  --outer-left: #d4cdc2;
  --panel: #c9c0b3;
  --outer-right: #ceb5a6;
  --card: #b9b2a8;
  --card-soft: #cfc7ba;
  --ink: #5a4c49;
  --muted: #776a66;
  --line: rgba(93, 80, 76, 0.17);
  --cream: #eee8de;
  --dark: #1d1c1a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, var(--outer-left) 0 20%, var(--panel) 20% 80%, var(--outer-right) 80% 100%);
  color: var(--ink);
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

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

.page-shell {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.profile-panel {
  width: min(60vw, 1120px);
  min-height: 100dvh;
  padding: clamp(14px, 3vh, 42px) clamp(20px, 4vw, 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait-frame {
  width: min(520px, 60vw);
  height: clamp(230px, 34vh, 390px);
  overflow: hidden;
  border-radius: 20px;
  background: #d8d0c4;
  flex: 0 0 auto;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
}

.brand-lockup {
  width: min(300px, 38vw);
  height: clamp(38px, 5.8vh, 58px);
  margin-top: clamp(7px, 1.2vh, 13px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0.88;
}

.brand-lockup img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(-8%);
  filter: sepia(14%) saturate(55%) opacity(0.86);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 3vw, 44px);
  margin-top: clamp(13px, 2.3vh, 27px);
  color: var(--ink);
}

.social-link {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  opacity: 0.96;
  transition: opacity 180ms ease, transform 180ms ease;
}

.social-link:hover {
  opacity: 0.72;
  transform: translateY(-1px);
}

.social-link svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-link svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.62;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link path,
.social-link rect,
.social-link circle {
  vector-effect: non-scaling-stroke;
}

.social-link path {
  fill: none;
}

.social-link[aria-label='TikTok'] path,
.social-link[aria-label='YouTube'] path,
.social-link[aria-label='Facebook'] path {
  fill: currentColor;
  stroke: none;
}

.tabs {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(22px, 4vw, 54px);
  margin-top: clamp(18px, 3vh, 32px);
  color: var(--muted);
  font-size: clamp(17px, 1.9vw, 25px);
  line-height: 1;
  white-space: nowrap;
  font-weight: 300;
}

.tab {
  padding: 16px 0;
}

.tab.active {
  padding: 16px 24px;
  border-radius: 10px;
  background: rgba(158, 148, 137, 0.45);
  color: var(--ink);
  font-weight: 600;
}

.signup-section {
  width: 100%;
  margin-top: clamp(18px, 3vh, 34px);
}

.book-copy {
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 2.9vw, 34px);
  line-height: 1.08;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

.subtitle {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: clamp(13px, 1.35vw, 17px);
  line-height: 1.35;
  font-weight: 300;
}

.subtitle em {
  font-style: italic;
  font-weight: 300;
}

.signup-card {
  width: 100%;
  min-height: clamp(102px, 13.5vh, 132px);
  display: grid;
  grid-template-columns: clamp(88px, 13vw, 130px) 1fr auto;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--card);
}

.book-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
}

.book-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(24, 22, 21, 0.5) 0%, rgba(24, 22, 21, 0.08) 45%, rgba(24, 22, 21, 0.62) 100%);
  pointer-events: none;
}

.book-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 28%;
  filter: saturate(0.82) contrast(0.96) brightness(0.86);
}

.cover-title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 11px;
  z-index: 1;
  color: rgba(246, 242, 235, 0.94);
  font-size: clamp(9px, 1vw, 12px);
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0;
}

.email-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 3vw, 32px);
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(17px, 1.9vw, 23px);
  font-weight: 600;
}

input::placeholder {
  color: rgba(90, 76, 73, 0.74);
  opacity: 1;
}

button {
  align-self: center;
  min-width: 92px;
  height: 48px;
  margin-right: 22px;
  border: 0;
  border-radius: 9px;
  background: rgba(238, 232, 222, 0.82);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: #f6f1e8;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  padding-bottom: 1px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.form-message[data-state='success'] {
  color: #4d5f4d;
}

.form-message[data-state='error'] {
  color: #7b4942;
}

.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;
}

@media (max-height: 780px) and (min-width: 700px) {
  .profile-panel {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .portrait-frame {
    height: 248px;
    width: 430px;
  }

  .brand-lockup {
    width: 240px;
    height: 36px;
    margin-top: 6px;
  }

  .social-links {
    margin-top: 12px;
  }

  .tabs {
    margin-top: 17px;
  }

  .signup-section {
    margin-top: 16px;
  }

  .signup-card {
    min-height: 92px;
  }
}

@media (max-width: 680px) {
  body {
    background: var(--panel);
  }

  .profile-panel {
    width: 100%;
    padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  }

  .portrait-frame {
    width: min(100%, 430px);
    height: min(36vh, 330px);
    border-radius: 16px;
  }

  .brand-lockup {
    width: min(230px, 64vw);
    height: 37px;
    margin-top: 7px;
  }

  .social-links {
    gap: clamp(18px, 7vw, 34px);
    margin-top: 13px;
  }

  .social-link {
    width: 27px;
    height: 27px;
  }

  .tabs {
    justify-content: flex-start;
    gap: 18px;
    margin-top: 18px;
    overflow: hidden;
    font-size: clamp(14px, 4vw, 17px);
  }

  .tab {
    padding: 13px 0;
  }

  .tab.active {
    padding: 13px 17px;
  }

  .signup-section {
    margin-top: 15px;
  }

  h1 {
    font-size: clamp(21px, 6.1vw, 25px);
  }

  .subtitle {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .signup-card {
    grid-template-columns: 78px 1fr;
    grid-template-rows: 72px auto;
    min-height: 126px;
  }

  .book-thumb {
    grid-row: 1 / 3;
  }

  .email-wrap {
    min-height: 72px;
    padding: 0 16px;
  }

  input {
    font-size: 16px;
  }

  button {
    width: calc(100% - 28px);
    height: 40px;
    margin: 0 14px 14px 0;
    justify-self: stretch;
    font-size: 16px;
  }
}

@media (max-width: 380px), (max-height: 700px) and (max-width: 680px) {
  .profile-panel {
    padding-top: 12px;
  }

  .portrait-frame {
    height: 31vh;
  }

  .social-links,
  .tabs {
    margin-top: 12px;
  }

  .signup-section {
    margin-top: 10px;
  }

  .signup-card {
    min-height: 116px;
  }

  .form-message {
    margin-top: 9px;
    font-size: 14px;
  }
}
