:root {
  --ink: #151515;
  --paper: #f4f0e8;
  --cream: #fffaf0;
  --red: #d7432f;
  --yellow: #f2b63d;
  --green: #18584c;
  --blue: #3b5d8a;
  --muted: #716e68;
  --line: rgba(21, 21, 21, 0.17);
  --header-height: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "IBM Plex Sans Thai", system-ui, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }

.site-header { position: fixed; z-index: 50; inset: 0 0 auto; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 64px); color: white; background: rgba(15, 15, 15, .9); border-bottom: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 145px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); border-radius: 50%; }
.brand-mark svg { width: 17px; fill: currentColor; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: "Pridi", serif; font-size: 20px; font-weight: 600; }
.brand small { margin-top: 4px; font-size: 9px; letter-spacing: 3px; }
.desktop-nav { display: flex; gap: 32px; font-size: 14px; }
.desktop-nav a { color: rgba(255,255,255,.78); transition: color .2s; }
.desktop-nav a:hover { color: white; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: transparent; border-radius: 50%; }
.icon-button:hover, .menu-button:hover { background: rgba(255,255,255,.12); }
.text-button { padding: 8px 14px; color: white; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; }
.member-trigger { min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.member-trigger svg { width: 17px; height: 17px; }
.menu-button { display: none; }

.hero { min-height: min(820px, 92vh); position: relative; display: flex; align-items: flex-end; overflow: hidden; background: #111; color: white; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: rgba(0,0,0,.44); }
.hero-content { position: relative; z-index: 2; width: min(720px, 78vw); margin: 0 0 clamp(80px, 11vh, 128px) clamp(20px, 7vw, 108px); }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: "Pridi", serif; font-size: clamp(58px, 8.4vw, 126px); font-weight: 600; line-height: .93; letter-spacing: 0; }
.hero-copy { max-width: 530px; margin: 24px 0 28px; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; color: rgba(255,255,255,.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.primary-button, .secondary-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border-radius: 4px; font-weight: 700; transition: transform .2s, background .2s; }
.primary-button { color: white; background: var(--red); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:hover { background: #bd3422; }
.secondary-button { color: white; background: rgba(16,16,16,.66); border: 1px solid rgba(255,255,255,.5); }
.hero-feature { position: absolute; z-index: 2; right: clamp(20px, 5vw, 72px); bottom: 48px; padding-left: 20px; border-left: 3px solid var(--yellow); display: flex; flex-direction: column; }
.hero-feature span, .hero-feature small { color: rgba(255,255,255,.65); font-size: 12px; }
.hero-feature strong { margin: 3px 0; font-size: 20px; }

.film-section, .steps { padding: 88px clamp(20px, 6vw, 88px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2, .creator-copy h2, .manifesto h2 { margin: 0; font-family: "Pridi", serif; font-size: clamp(34px, 4vw, 58px); line-height: 1.12; letter-spacing: 0; }
.search-wrap { width: min(340px, 100%); height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); background: rgba(255,255,255,.35); border-radius: 4px; }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.filter-row { display: flex; gap: 8px; margin-bottom: 34px; overflow-x: auto; scrollbar-width: none; }
.filter { flex: 0 0 auto; padding: 8px 15px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; }
.filter.active { color: white; background: var(--green); border-color: var(--green); }
.film-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 34px); }
.film-card { min-width: 0; cursor: pointer; }
.poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: #ccc; }
.poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .5s; }
.film-card:hover .poster img { transform: scale(1.035); }
.poster-badge { position: absolute; top: 12px; left: 12px; padding: 5px 8px; color: white; background: var(--red); border-radius: 3px; font-size: 11px; font-weight: 700; }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(0,0,0,.18); opacity: 0; transition: opacity .2s; }
.poster-play svg { width: 54px; height: 54px; fill: rgba(0,0,0,.34); }
.film-card:hover .poster-play, .film-card:focus-within .poster-play { opacity: 1; }
.film-info { padding-top: 14px; }
.film-info h3 { margin: 0 0 3px; font-family: "Pridi", serif; font-size: 21px; font-weight: 600; }
.film-info p { margin: 0; color: var(--muted); font-size: 13px; }
.film-info > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.film-info strong { color: var(--red); }
.film-info span { color: var(--muted); font-size: 12px; }
.empty-state { padding: 50px 0; color: var(--muted); text-align: center; }

.manifesto { display: grid; grid-template-columns: .8fr 1.45fr; gap: 40px 8vw; padding: 90px clamp(20px, 7vw, 108px); color: white; background: var(--green); }
.manifesto > p { max-width: 260px; margin: 8px 0 0; color: rgba(255,255,255,.68); font-size: 16px; line-height: 1.7; }
.manifesto h2 { color: var(--cream); }
.manifesto-stats { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.28); }
.manifesto-stats div { padding-top: 22px; display: flex; flex-direction: column; }
.manifesto-stats strong { font-family: "Pridi", serif; font-size: clamp(30px, 4vw, 48px); color: var(--yellow); }
.manifesto-stats span { color: rgba(255,255,255,.68); font-size: 13px; }

.steps { background: var(--cream); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.step-grid article { position: relative; min-height: 260px; padding: 32px 30px 25px 0; border-right: 1px solid var(--line); }
.step-grid article + article { padding-left: 30px; }
.step-grid article:last-child { border-right: 0; }
.step-grid article > span { position: absolute; right: 24px; top: 28px; color: #c5bfb3; font-family: "Pridi", serif; font-size: 30px; }
.step-grid svg { width: 36px; height: 36px; color: var(--red); }
.step-grid h3 { margin: 45px 0 8px; font-family: "Pridi", serif; font-size: 25px; }
.step-grid p { max-width: 280px; margin: 0; color: var(--muted); line-height: 1.65; }

.creator-section { display: grid; grid-template-columns: 1.15fr .85fr; }
.creator-copy, .creator-proof { min-height: 500px; padding: clamp(55px, 7vw, 100px); display: flex; flex-direction: column; justify-content: center; }
.creator-copy { color: white; background: #202020; }
.creator-copy > p:not(.section-kicker) { max-width: 580px; margin: 24px 0 30px; color: rgba(255,255,255,.7); line-height: 1.8; }
.primary-button.light { align-self: flex-start; color: var(--ink); background: var(--yellow); }
.creator-proof { position: relative; background: var(--yellow); }
.creator-proof::before { content: "“"; position: absolute; top: 35px; left: 55px; color: rgba(21,21,21,.13); font-family: Georgia, serif; font-size: 180px; line-height: 1; }
.creator-proof blockquote { position: relative; margin: 0 0 34px; font-family: "Pridi", serif; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.35; }
.creator-proof p { margin: 0; line-height: 1.6; }

footer { padding: 48px clamp(20px, 6vw, 88px); display: grid; grid-template-columns: 1fr 1.5fr auto; align-items: center; gap: 28px; color: white; background: #111; }
.footer-brand { color: white; }
footer > p { color: rgba(255,255,255,.6); }
footer > div { display: flex; gap: 18px; font-size: 13px; }
footer > small { grid-column: 1 / -1; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }

.modal { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.modal-panel { position: relative; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--cream); border-radius: 7px; box-shadow: 0 25px 80px rgba(0,0,0,.35); }
.modal-close { position: absolute; z-index: 3; top: 14px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; color: white; background: rgba(0,0,0,.68); border-radius: 50%; }
.film-modal-panel { display: grid; grid-template-columns: minmax(260px, .78fr) 1.22fr; overflow: hidden; }
.modal-poster { min-height: 580px; }
.modal-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.modal-content { padding: clamp(38px, 6vw, 72px); align-self: center; }
.status-label { display: inline-block; margin-bottom: 16px; padding: 5px 9px; color: white; background: var(--green); border-radius: 3px; font-size: 11px; font-weight: 700; }
.modal-content h2, .checkout-panel h2, .form-panel h2 { margin: 0 0 7px; font-family: "Pridi", serif; font-size: clamp(34px, 5vw, 54px); line-height: 1.1; }
.modal-meta, .modal-content > p { color: var(--muted); line-height: 1.7; }
.director { display: flex; flex-direction: column; margin: 28px 0; padding: 16px 0; border-block: 1px solid var(--line); }
.director span { color: var(--muted); font-size: 12px; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.price-row > div { display: flex; flex-direction: column; }
.price-row small { color: var(--muted); }
.price-row strong { color: var(--red); font-size: 31px; }
.checkout-panel, .form-panel { width: min(580px, 100%); padding: clamp(30px, 6vw, 58px); }
.checkout-film { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 16px; margin: 28px 0; padding: 14px; background: #ebe5da; border-radius: 5px; }
.checkout-film img { width: 70px; height: 94px; object-fit: cover; border-radius: 3px; }
.checkout-film div { display: flex; flex-direction: column; }
.checkout-film span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.checkout-film b { color: var(--red); font-size: 20px; }
fieldset { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 700; }
fieldset label { cursor: pointer; }
fieldset input { position: absolute; opacity: 0; }
fieldset label span { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; }
fieldset input:checked + span { border: 2px solid var(--green); background: rgba(24,88,76,.06); }
.checkout-button { width: 100%; }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; color: var(--muted); }
.secure-note svg { width: 15px; }
.form-panel > p:not(.section-kicker) { color: var(--muted); line-height: 1.6; }
.form-panel form { display: grid; gap: 15px; margin-top: 24px; }
.form-panel label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.form-panel input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: white; outline: none; }
.form-panel input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,88,76,.1); }
.auth-panel, .profile-panel { width: min(520px, 100%); padding: clamp(30px, 5vw, 52px); }
.auth-panel h2, .profile-panel h2 { margin: 0; font-family: "Pridi", serif; font-size: 40px; line-height: 1.15; }
.auth-intro { margin: 10px 0 22px; color: var(--muted); line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-tab { min-height: 44px; color: var(--muted); background: transparent; border-bottom: 3px solid transparent; font-weight: 700; }
.auth-tab.active { color: var(--green); border-bottom-color: var(--green); }
.auth-form { display: grid; gap: 15px; }
.auth-form[hidden] { display: none; }
.auth-form > label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.auth-form input:not([type="checkbox"]) { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: white; outline: none; }
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,88,76,.1); }
.consent-row { grid-template-columns: 18px 1fr; align-items: start; line-height: 1.5; color: var(--muted); }
.consent-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--green); }
.form-error { min-height: 20px; margin: -4px 0 0; color: #a52e20; font-size: 13px; }
.prototype-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: var(--muted); text-align: center; }
.prototype-note svg { width: 15px; height: 15px; flex: 0 0 auto; }
.profile-heading { display: flex; align-items: center; gap: 16px; padding-right: 38px; }
.profile-heading .section-kicker { margin-bottom: 3px; }
.profile-heading h2 { font-size: 32px; overflow-wrap: anywhere; }
.profile-heading p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.profile-avatar { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-family: "Pridi", serif; font-size: 25px; }
.profile-summary { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0; border-block: 1px solid var(--line); }
.profile-summary div { display: flex; flex-direction: column; padding: 18px 0; }
.profile-summary div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.profile-summary strong { font-family: "Pridi", serif; font-size: 25px; }
.profile-summary span { color: var(--muted); font-size: 12px; }
.library-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.library-heading h3 { margin: 0; font-family: "Pridi", serif; font-size: 22px; }
.library-heading span { color: var(--muted); font-size: 11px; }
.library-empty { margin: 14px 0 24px; padding: 25px 15px; color: var(--muted); background: #ebe5da; text-align: center; border-radius: 5px; }
.library-item { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; margin-top: 12px; padding: 10px; background: #ebe5da; border-radius: 5px; }
.library-item img { width: 54px; height: 72px; object-fit: cover; border-radius: 3px; }
.library-item div { min-width: 0; display: flex; flex-direction: column; }
.library-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-item span { color: var(--muted); font-size: 11px; }
.library-item button { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--red); border-radius: 50%; }
.logout-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; color: #a52e20; background: transparent; border: 1px solid rgba(165,46,32,.35); border-radius: 4px; font-weight: 700; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 30px); padding: 13px 18px; color: white; background: var(--green); border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-button { display: grid; }
  .text-button:not(.member-trigger) { display: none; }
  .member-trigger { min-width: 42px; max-width: 126px; padding-inline: 10px; }
  .member-trigger span { overflow: hidden; text-overflow: ellipsis; }
  .site-header.nav-open { height: auto; min-height: var(--header-height); flex-wrap: wrap; padding-bottom: 15px; }
  .site-header.nav-open .desktop-nav { order: 3; width: 100%; display: grid; gap: 0; padding-top: 10px; }
  .site-header.nav-open .desktop-nav a { padding: 13px 0; border-top: 1px solid rgba(255,255,255,.12); }
  .hero-content { width: calc(100% - 40px); margin-left: 20px; }
  .hero-feature { display: none; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manifesto { grid-template-columns: 1fr; }
  .manifesto-stats { grid-column: 1; }
  .creator-section { grid-template-columns: 1fr; }
  .creator-copy, .creator-proof { min-height: 420px; }
  footer { grid-template-columns: 1fr; }
  footer > small { grid-column: 1; }
  .film-modal-panel { grid-template-columns: .72fr 1.28fr; }
}

@media (max-width: 620px) {
  :root { --header-height: 64px; }
  .site-header { padding-inline: 16px; }
  .brand-mark { width: 32px; height: 32px; }
  .hero { min-height: 86vh; }
  .hero > img { object-position: 64% center; }
  .hero-content { margin-bottom: 55px; }
  .hero h1 { font-size: clamp(52px, 17vw, 76px); }
  .hero-copy { font-size: 16px; }
  .hero-actions > * { flex: 1 1 150px; }
  .film-section, .steps { padding: 64px 16px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .film-grid { gap: 24px 12px; }
  .film-info h3 { font-size: 18px; }
  .film-info > div { flex-direction: column; gap: 2px; }
  .manifesto { padding: 64px 20px; }
  .manifesto-stats { gap: 14px; }
  .manifesto-stats strong { font-size: 25px; }
  .manifesto-stats span { font-size: 11px; }
  .step-grid { grid-template-columns: 1fr; }
  .step-grid article, .step-grid article + article { min-height: 220px; padding: 30px 10px 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .step-grid article:last-child { border-bottom: 0; }
  .creator-copy, .creator-proof { min-height: 400px; padding: 54px 22px; }
  footer > div { flex-direction: column; gap: 10px; }
  .modal { padding: 10px; align-items: flex-end; }
  .modal-panel { max-height: calc(100vh - 20px); }
  .film-modal-panel { grid-template-columns: 1fr; }
  .modal-poster { height: 270px; min-height: 0; }
  .modal-poster img { object-position: center 28%; }
  .modal-content { padding: 28px 22px; }
  .price-row { align-items: stretch; flex-direction: column; }
  .price-row .primary-button { width: 100%; }
  .checkout-panel, .form-panel, .auth-panel, .profile-panel { padding: 34px 20px 24px; }
  .auth-panel h2 { font-size: 34px; }
  .profile-heading h2 { font-size: 27px; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .checkout-film { grid-template-columns: 56px 1fr auto; padding: 10px; gap: 10px; }
  .checkout-film img { width: 56px; height: 75px; }
}
