/* base.css — global tokens + reset + page layout foundations */

/* Prevent flash only until i18n is ready */
html:not(.i18n-ready) body{
  visibility: hidden;
}

:root{
  --bg: #f6f2e9;
  --bg2: #fbf8f2;

  --text: #0b1020;
  --muted: rgba(11,16,32,.70);

  --orange: #ff8c00;

  --line: rgba(11,16,32,.15);
  --panel: rgba(11,16,32,.04);

  --radius: 16px;
  --header-bg: rgba(251,248,242,.92);
  --header-blue: #1f3a5f;
  --header-text: #ffffff;

  --menu-btn-size: 44px;
}

*{ box-sizing: border-box; }

/* Keep html scroll behavior consistent, but DO NOT lock body height */
html{ margin:0; padding:0; height: 100%; overflow-y: scroll; }

/* Sticky footer ONLY for pages that use <main class="page"> */
body:has(main.page){
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(main.page) main.page{ flex: 1 0 auto; }

body{
  margin: 0;
  padding: 0;
  overflow-x: hidden;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Clean, uniform background */
  background: var(--bg);

  color: var(--text);
  line-height: 1.5;
}

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

.container{
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ================= PAGE ================= */

.page{
  padding-top: var(--header-offset, 132px);
}

.page-header{
  padding: 22px 0 10px;
}

.page-header h1{
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
}

.lead{ color: var(--muted); max-width: 70ch; margin: 0; }

/* ================= FOOTER SPACING OVERRIDES (moved from footer.css) ================= */

main.auth-page{
  padding-top: var(--header-offset, 92px) !important;
  padding-bottom: 0 !important;
}

/* Auth pages: remove extra gap before footer */
main.auth-page + .footer{ margin-top: 0; }

/* =========================================================
   AUTH PAGES (Sign In / Register / Forgot / Reset)
   ========================================================= */

.auth-wrap{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 2fr 1fr;
}

.auth-left{
  background: url("../assets/bg7.jpg") center / cover no-repeat;
  position: relative;
}

.auth-left::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(11,16,32,.18);
}

.auth-right{
  background:#fff;
  border-left: 1px solid var(--line);
  padding: clamp(18px, 3vw, 34px);
  display:flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.auth-form{
  display:flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}

.auth-input:focus{
  border-color: rgba(255,140,0,.70);
  box-shadow: 0 0 0 4px rgba(255,140,0,.15);
  background: #fff;
}

.btn-auth{
  height: 46px;
  border: 1px solid rgba(11,16,32,.18);
  border-radius: 999px;
  background: rgba(255,140,0,.18);
  border-color: rgba(255,140,0,.55);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 6px;
}

.btn-auth:disabled{ opacity:.55; cursor:not-allowed; }

.btn-auth:hover{
  filter: brightness(1.03);
}

.auth-links a:hover{
  text-decoration: underline;
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-head{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.auth-title{
  margin:0;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 850;
}

.auth-subtitle{
  margin: 6px 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.logo-small{
  width: min(180px, 48%);
  height: auto;
  display:block;
}

.auth-form label{
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: 6px;
}

.auth-form input{
  width:100%;
  height:44px;
  padding:0 14px;
  border-radius: 999px;
  border:1px solid var(--line);
  outline:none;
  background: rgba(11,16,32,.03);
  color: var(--text);
}

.auth-form input:focus{
  border-color: rgba(255,140,0,.55);
  box-shadow: 0 0 0 3px rgba(255,140,0,.18);
  background: rgba(11,16,32,.02);
}

.req{ color: var(--orange); font-weight: 700; margin-left: 2px; }

.required-note{
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.hint{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.link-auth{
  color: rgba(11,16,32,.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Auth helper text (matches register/sign-in) */
.auth-form .hint{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.checkbox{
  display:flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: rgba(11,16,32,.85);
  line-height: 1.35;
}

.checkbox input[type="checkbox"]{
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
}

@media (max-width: 960px){
  .auth-wrap{ grid-template-columns: 1fr; }
  .auth-left{ display:none; }
  .auth-right{ min-height: 100vh; border-left: 0; }
  .grid-2{ grid-template-columns: 1fr; }
  .logo-small{ width: 160px; }
}
