/* DECHIVE / One Scene. One Thought. v3 */
:root {
  color-scheme: dark;
  --ink: #171714;
  --ivory: #f7f0e4;
  --gold: #e6c9a0;
  --serif: 'Noto Serif KR', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
*,*::before,*::after { box-sizing:border-box; }
html { background:var(--ink); scroll-behavior:smooth; }
body { margin:0; color:var(--ivory); background:var(--ink); -webkit-font-smoothing:antialiased; }
button,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; font:inherit; }
a { color:inherit; text-decoration:none; }
:focus-visible { outline:2px solid var(--gold); outline-offset:4px; }
[hidden] { display:none!important; }
.skip-link { position:absolute; z-index:50; left:16px; top:-80px; padding:12px 18px; background:white; color:black; }
.skip-link:focus { top:12px; }

.landing { position:relative; isolation:isolate; width:100%; height:100vh; height:100svh; min-height:580px; overflow:hidden; background:#251e18; }
.backdrop { position:absolute; inset:0; z-index:-3; overflow:hidden; }
.backdrop img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 50%; }
.backdrop-shade { position:absolute; inset:0; z-index:-2; pointer-events:none;
  background:linear-gradient(90deg, rgba(12,11,10,.44) 0%, rgba(14,13,11,.19) 30%, transparent 55%),
             linear-gradient(0deg, rgba(10,10,9,.34) 0%, transparent 32%, transparent 86%, rgba(10,10,9,.12) 100%);
}

.landing-main { position:relative; height:calc(100% - 66px); }
.hero-message { position:absolute; z-index:2; top:38%; left:clamp(28px,11.8vw,210px); transform:translateY(-50%);
  max-width:calc(100% - 60px); text-shadow:0 2px 24px rgba(0,0,0,.18); }
.hero-message h1 { display:flex; align-items:baseline; gap:clamp(15px,2.8vw,49px); margin:0; white-space:nowrap;
  font-family:var(--serif); font-weight:400; line-height:1.35; letter-spacing:-.075em; }
.title-prefix { font-size:clamp(29px,3.1vw,48px); color:var(--ivory); }
.title-typed { position:relative; display:inline-flex; align-items:baseline; color:#f2d5a8;
  font-size:clamp(46px,4.85vw,78px); font-weight:500; min-width:3.05em; }
.type-caret { display:inline-block; position:relative; height:.95em; width:2px; flex:none; margin-left:.10em; top:.09em;
  background:#f5ddbb; box-shadow:0 0 8px rgba(247,223,180,.45); animation:blink 1s steps(1,end) infinite; }
@keyframes blink { 0%,49% { opacity:1 } 50%,100% { opacity:0 } }
.hero-subtitle { margin:25px 0 0 2px; font:400 clamp(14px,1.35vw,19px)/1.95 var(--serif);
  color:#f4e9d9; letter-spacing:-.045em; word-break:keep-all; }

.landing-actions { position:absolute; z-index:2; right:clamp(25px,5.1vw,90px); bottom:clamp(35px,8vh,105px);
  display:flex; flex-direction:column; align-items:flex-end; gap:0; width:max-content; }
.landing-actions button { display:block; min-height:44px; width:max-content; padding:7px 0;
  border:0; border-radius:0; outline-offset:5px; background:none; box-shadow:none; appearance:none; color:var(--ivory);
  font:400 clamp(16px,1.28vw,20px)/1.45 var(--serif); letter-spacing:-.04em; text-align:right;
  transition:color .2s ease; }
.landing-actions button:not(:disabled):hover { color:var(--gold); }
.landing-actions button:disabled { cursor:default; opacity:1; }
.records-list { list-style:none; margin:2px 0 12px; padding:0; display:flex; flex-direction:column; align-items:flex-end; gap:3px; }
.records-list li { padding:3px 0; color:var(--gold); font:400 clamp(14px,1.12vw,17px)/1.6 var(--sans); letter-spacing:.03em; }
.records-list a { display:inline-block; color:inherit; padding:4px 0; transition:color .2s ease; }
.records-list a:hover { color:var(--ivory); }
#records-toggle[aria-expanded="true"] { color:var(--gold); }

.notice { max-width:calc(100vw - 32px); border:0; padding:0; background:transparent; color:#232820; }
.notice::backdrop { background:rgba(0,0,0,.67); backdrop-filter:blur(5px); }
.notice-inner { position:relative; background:#f4f0e8; padding:42px clamp(24px,5vw,50px); min-width:min(420px,calc(100vw - 32px)); }
.notice-close { position:absolute; right:15px; top:8px; border:0; background:transparent; font-size:30px; color:#263027; }
.notice-brand { font:600 11px var(--sans); letter-spacing:.22em; margin:0 0 31px; }
.notice h2 { margin:0 0 14px; font:500 24px/1.5 var(--serif); }
.notice p:not(.notice-brand) { font:400 14px/1.8 var(--serif); margin:0 0 28px; color:#535c55; }
.notice-done { background:transparent; color:#263027; border:1px solid #4a554d; padding:10px 22px; min-width:100px; }

@media(max-width:760px) {
  .landing { min-height:720px; height:100svh; }
  .backdrop img { object-position:64% center; }
  .backdrop-shade { background:linear-gradient(90deg,rgba(14,12,10,.68),rgba(14,12,10,.3) 65%,rgba(14,12,10,.12)),
     linear-gradient(0deg,rgba(10,10,9,.55),transparent 37%,transparent 80%,rgba(10,10,9,.12)); }
  .landing-main { height:calc(100% - 60px); }
  .hero-message { top:35%; left:clamp(24px,7vw,35px); max-width:calc(100% - 42px); }
  .hero-message h1 { gap:13px; letter-spacing:-.07em; }
  .title-prefix { font-size:clamp(23px,6vw,31px); }
  .title-typed { font-size:clamp(37px,9.8vw,48px); min-width:3.05em; }
  .hero-subtitle { margin-top:23px; font-size:clamp(13px,3.6vw,17px); line-height:1.9; }
  .landing-actions { right:23px; bottom:clamp(22px,5vh,55px); }
  .landing-actions button { min-height:44px; font-size:16px; padding:7px 0; }
}
@media(max-width:360px) {
  .hero-message h1 { gap:10px; }
  .title-prefix { font-size:21px; }
  .title-typed { font-size:36px; }
}
@media(max-height:580px) {
  .landing { height:auto; min-height:580px; overflow:visible; }
  .landing-main { min-height:514px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; }
  .type-caret { opacity:1; }
}

/* Newsletter signup dialog — one email field, no new landing sections */
.newsletter-dialog .notice-inner{width:min(440px,calc(100vw - 32px));}
.newsletter-description{font:400 14px/1.75 var(--serif)!important;margin:0 0 23px!important;color:#525e55!important;}
.newsletter-label{display:block;margin:0 0 9px;color:#374039;font:500 13px/1.5 var(--serif);}
#newsletter-email{display:block;width:100%;min-height:49px;border:1px solid #b7b6ac;background:#fffdf8;border-radius:0;padding:12px 14px;color:#1e2621;font:400 16px/1.4 var(--sans);outline-offset:2px;}
#newsletter-email:focus{border-color:#485547;outline:1px solid #485547;}
.newsletter-consent{display:flex;gap:10px;align-items:start;margin-top:19px;color:#454e47;font:400 12px/1.7 var(--serif);cursor:pointer;}
.newsletter-consent input{width:16px;height:16px;flex:none;margin:2px 0 0;accent-color:#34483a;}
.newsletter-privacy{margin:12px 0 0!important;color:#687168!important;font:400 11px/1.65 var(--serif)!important;}
.newsletter-status{min-height:0;margin:13px 0 0!important;font:400 12px/1.7 var(--serif)!important;color:#4f5d52!important;}
.newsletter-status:empty{display:none;}
.newsletter-status.is-error{color:#9c3d36!important;}
.newsletter-honeypot{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden;}
.newsletter-submit{display:block;width:100%;min-height:47px;margin-top:22px;border:1px solid #27372d;border-radius:0;background:#25372d;color:#f9f4e9;font:500 14px/1.5 var(--serif);transition:background .2s;}
.newsletter-submit:hover{background:#395443;}
.newsletter-submit:disabled{opacity:.7;cursor:wait;}

/* Consultation form — embedded Google Form in a native, accessible modal */
.consult-dialog{width:min(720px,calc(100vw - 32px));height:min(88dvh,900px);max-height:calc(100dvh - 24px);max-width:none;
  padding:0;border:0;border-radius:0;background:#f4f0e8;color:#222921;overflow:hidden;}
.consult-dialog::backdrop{background:rgba(0,0,0,.70);backdrop-filter:blur(5px);}
.consult-panel{height:100%;min-height:0;display:flex;flex-direction:column;}
.consult-heading{flex:none;min-height:91px;padding:19px 25px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.consult-heading-copy{display:flex;flex-direction:column;gap:8px;}
.consult-brand{font:600 10px/1.4 var(--sans);letter-spacing:.22em;}
.consult-heading h2{font:500 21px/1.4 var(--serif);margin:0;letter-spacing:-.04em;}
.consult-close{flex:none;align-self:flex-start;width:38px;height:38px;padding:0;border:0;background:none;color:#263027;font:300 32px/1 var(--sans);}
.consult-frame{display:block;flex:1 1 auto;width:100%;min-height:0;border:0;background:#fff;color:#222;}
.consult-footer{flex:none;min-height:42px;padding:11px 24px 14px;text-align:right;background:#f4f0e8;}
.consult-footer a{color:#445147;font:400 12px/1.5 var(--serif);text-decoration:underline;text-underline-offset:3px;}
.consult-footer a:hover{color:#152719;}
@media(max-width:760px){
  .consult-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:none;margin:auto;}
  .consult-heading{min-height:78px;padding:13px 16px 10px;}
  .consult-heading h2{font-size:19px;}
  .consult-footer{padding:9px 16px 13px;}
}

/* Unified newsletter form is hosted at letter.dechive.app.
   The DECHIVE modal embeds the same form without a second subscriber system. */
.newsletter-dialog{
  width:min(570px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  overflow:hidden;
}
.newsletter-dialog .notice-inner{
  width:100%;
  min-width:0;
  padding:26px clamp(12px,3vw,22px) 12px;
  max-height:calc(100dvh - 24px);
}
.newsletter-dialog .notice-brand {margin-bottom:8px;}
.newsletter-dialog .newsletter-description {margin-bottom:10px!important;font-size:12px!important;}
#newsletter-frame{
  display:block;
  width:100%;
  height:min(640px,calc(100dvh - 172px));
  min-height:260px;
  border:0;
  background:#f4f0e8;
}
.newsletter-dialog .newsletter-privacy{
  margin:8px 0 0!important;
  font-size:11px!important;
  line-height:1.5!important;
}
.newsletter-dialog .newsletter-privacy a{
  color:#354f41;
  text-decoration:underline;
  text-underline-offset:3px;
}
@media(max-width:420px){
  .newsletter-dialog .notice-inner{padding:22px 8px 10px;}
}

/* Subscription submitted: show a clear acknowledgement inside the existing
   DECHIVE newsletter dialog instead of nesting a dialog inside the iframe. */
.newsletter-dialog [hidden]{display:none!important;}
.newsletter-dialog .newsletter-success{
  padding:10px 0 4px;
}
.newsletter-dialog .newsletter-success p{
  margin:0 0 14px!important;
  font:400 14px/1.85 var(--serif)!important;
  color:#455048!important;
  word-break:keep-all;
}
.newsletter-dialog .newsletter-success p:first-child{
  font-weight:600!important;
  color:#202921!important;
}
.newsletter-success-confirm{
  display:block;
  width:100%;
  min-height:47px;
  margin-top:22px;
  border:0;
  border-radius:0;
  background:#25372d;
  color:#f9f4e9;
  font:600 14px/1.5 var(--serif);
  cursor:pointer;
}
.newsletter-success-confirm:hover{background:#395443;}
