/* =====================================================================
   site.css: layout for the marketing page (index.html), the legal
   pages (terms.html, privacy.html), the sign-in page (login.html) and,
   together with journal.css, the Journal pages. Colors, fonts, buttons and
   the nav/footer themselves come from base.css; this file only arranges
   them on the page.
   ===================================================================== */

/* ---------- Sections ------------------------------------------------ */
.section{padding:var(--space-section) 0 0;}
.section-last{padding-bottom:var(--space-section);}

/* Section heading: deliberately left-aligned, not centered. */
.section-head{
  max-width:820px;margin-bottom:72px;
}
.section-head h2{font-size:clamp(28px,3.4vw,40px);margin:10px 0 22px;}
.section-head .rule-gold{margin-bottom:22px;}
.section-head p{max-width:62ch;color:var(--muted-on-light);}

/* ---------- Hero ---------------------------------------------------- */
.hero{
  position:relative;
  margin-top:-89px;padding-top:89px;
  min-height:min(860px, 100vh);
  display:flex;align-items:center;
  overflow:hidden;
}
.hero-grid{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,420px);
  gap:clamp(28px,4vw,64px);
  align-items:center;
  padding-top:48px;padding-bottom:96px;
}
.hero-copy{max-width:520px;align-self:center;}
.hero-copy h1{font-size:clamp(34px,4.4vw,56px);margin:18px 0 26px;}
.hero-subtitle{
  font-family:var(--font-serif-en);
  font-size:clamp(1.15rem,1.6vw,1.35rem);
  line-height:1.7;
  color:var(--indigo-muted);
  margin-bottom:40px;
  max-width:44ch;
}
/* The framed board, hung slightly lower than the text, for asymmetry. */
.hero-goban{margin:64px 0 0;}
.goban-surface{background:var(--wood);padding:6px;}
.hero-goban figcaption{margin-top:18px;display:grid;gap:4px;}
.hero-goban figcaption .subhead-en{font-size:1.05rem;}

@media (max-width:980px){
  .hero-grid{grid-template-columns:1fr;}
  .hero-goban{max-width:440px;margin:24px auto 0;}
}
@media (max-width:560px){
  .hero-grid{padding-top:24px;}
  .hero-goban{margin:16px 0 0;}
}

/* ---------- Three framed panels ------------------------------------- */
/* Room under the panels before the colored philosophy band begins. */
.section-panels{padding-bottom:var(--space-section);}
.panel-row{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(20px,3vw,44px);
  align-items:start;
}
.panel-shoji .frame-kumiko{height:100%;}
.panel-body{
  display:flex;flex-direction:column;gap:14px;
  padding:40px 34px 36px;
  min-height:400px;
}
/* The step number (1, 2, 3); its font, size and color are in
   style-montsuki.css. */
.panel-num{line-height:1;margin-bottom:6px;}
.panel-body h3{font-size:34px;letter-spacing:-.01em;}
.panel-body p{font-size:15px;line-height:1.7;}
.surface-indigo p,.surface-forest p,.surface-kaki p{color:var(--muted-on-dark);}
.panel-body .link-arrow{margin-top:auto;align-self:flex-start;}
@media (max-width:860px){
  .panel-row{grid-template-columns:1fr;max-width:520px;}
  .panel-body{min-height:0;}
}

/* ---------- The framed "scroll" ------------------------------------- */
.scroll-frame{
  display:grid;grid-template-columns:84px minmax(0,1fr);
  background-color:var(--ivory);
}
/* The indigo strip down the left side, like the mounting of a hanging
   scroll, with a hanging tassel. */
.scroll-strip{
  position:relative;
  display:flex;flex-direction:column;align-items:center;
  padding:48px 0;
}
.tassel{
  position:absolute;bottom:-58px;left:50%;
  width:1px;height:70px;background:var(--gold-muted);
}
.tassel::after{   /* the little vermilion tuft at the end of the cord */
  content:"";position:absolute;bottom:-26px;left:-4px;
  width:9px;height:28px;border-radius:2px 2px 4px 4px;
  background:linear-gradient(var(--vermilion), #a84a38);
  opacity:.85;
}
.scroll-body{
  display:grid;grid-template-columns:minmax(220px,360px) minmax(0,1fr);
  gap:clamp(32px,5vw,72px);align-items:center;
  padding:clamp(40px,6vw,80px);
}
.scroll-goban{width:100%;height:auto;}
.scroll-text blockquote{
  margin:16px 0 10px;
  font-family:var(--font-serif-en);font-style:italic;font-weight:500;
  font-size:clamp(1.5rem,2.4vw,2rem);line-height:1.45;
  color:var(--ink);
}
.attribution{color:var(--muted-on-light);font-size:14px;margin-bottom:32px;}
.scroll-text .rule-gold{margin-bottom:32px;}
.principles{margin:0 0 36px;display:grid;gap:22px;}
.principles dt{
  font-family:var(--font-display);font-weight:600;font-size:15px;
  letter-spacing:0;text-transform:none;color:var(--ink);
}
.principles dd{margin:4px 0 0;color:var(--muted-on-light);font-size:15px;max-width:60ch;}
@media (max-width:900px){
  .scroll-body{grid-template-columns:1fr;}
  .scroll-goban{max-width:320px;}
}
@media (max-width:620px){
  .scroll-frame{grid-template-columns:1fr;}
  .scroll-strip{padding:18px 0;}
  .tassel{display:none;}
}

/* ---------- Legal pages (terms.html, privacy.html) ------------------ */
.legal{padding:72px 0 var(--space-section);}
.legal-layout{
  display:grid;grid-template-columns:minmax(0,760px);
  gap:clamp(24px,4vw,56px);
}
.legal-panel{padding:clamp(32px,5vw,64px);}
.legal-panel h1{font-size:clamp(32px,4vw,44px);margin:10px 0 8px;}
.legal-updated{color:var(--muted-on-light);font-size:14px;margin-bottom:32px;}
/* The "this is a draft" notice: a thin vermilion rule on the left. */
.legal-notice{
  border-left:2px solid var(--vermilion);
  padding:4px 0 4px 20px;margin:0 0 48px;
  color:var(--charcoal);font-size:15px;
}
.legal-panel section{margin-top:40px;}
.legal-panel h2{font-size:21px;margin-bottom:10px;}
.legal-panel p,.legal-panel li{color:var(--charcoal);font-size:15.5px;}
.legal-panel ul{padding-left:1.2em;margin:0;}
.legal-panel li{margin-bottom:6px;}
.legal-back{margin-top:56px;}
@media (max-width:620px){
  .legal-layout{grid-template-columns:1fr;}
}

/* ---------- Sign-in page (login.html) -------------------------------- */
/* The sign-in box sits in the middle of the window, which it fits without
   scrolling: the page is exactly the window's height and the box is
   centred in whatever room the top bar (phones only) leaves. A window too
   short for the box still scrolls, rather than cutting it off. */
body.login-page{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;}
.login-main{flex:1;display:flex;justify-content:center;align-items:center;padding:24px 16px;}
.login-card{width:min(480px,100%);}
.login-inner{
  display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;
  background-color:var(--ivory);background-image:var(--grain-page);
  padding:32px clamp(22px,5vw,48px) 28px;
}
.login-inner h1{font-size:clamp(26px,4vw,32px);}
.login-intro{color:var(--muted-on-light);font-size:15px;line-height:1.6;}
.login-form{width:100%;display:grid;gap:14px;margin-top:8px;text-align:left;}
.login-field{display:flex;flex-direction:column;gap:6px;}
.login-field[hidden]{display:none;}
.login-field > span{font-size:13.5px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--muted-on-light);}
.login-field input{
  width:100%;min-height:42px;padding:8px 12px;
  font:inherit;font-size:15px;color:var(--charcoal);
  background:var(--field);border:var(--rule) solid rgba(124,90,52,.4);border-radius:var(--radius);
}
.login-field input:focus-visible{outline:1px solid var(--gold-muted);outline-offset:1px;border-color:var(--gold-muted);}
.login-error{color:var(--error);font-size:14px;}
.login-dev{width:100%;padding:8px 12px;border:var(--rule) dashed rgba(124,90,52,.5);font-size:13px;color:var(--wood-ink);}
.login-dev[hidden]{display:none;}
.login-error:empty{display:none;}
.login-submit{width:100%;margin-top:4px;}
.login-switch{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:6px 12px;margin-top:10px;font-size:14px;color:var(--muted-on-light);}
