/* =========================
   Global / Base Styles
   File: static/css/base.css
   Full-page layout (no fixed box)
   ========================= */

:root{
  --bg: #ffffff;
  --ink: #0b0b0b;
  --muted: rgba(11,11,11,.70);
  --rule: rgba(11,11,11,.22);
  --input-bg: #ffffff;
  --input-border: rgba(11,11,11,.22);

  --serif: "DM Serif Display", serif;
  --sans: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Brandon spec:
     72pt ≈ 96px
     24pt ≈ 32px
  */
  --type-72pt: 96px;
  --type-24pt: 32px;

  --page-pad-x: 56px;
  --page-pad-top: 28px;
  --page-pad-bottom: 64px;

  --content-max: 1280px;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #414042;
  --ink: #f0f0f0;
  --muted: rgba(240,240,240,.70);
  --rule: rgba(240,240,240,.22);
  --input-bg: #333333;
  --input-border: rgba(240,240,240,.22);
}

/* Reset */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global scrollbar styling (blends with design) */
html{
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--bg);
}

::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track{
  background: var(--bg);
}
::-webkit-scrollbar-thumb{
  background: rgba(11,11,11,.30);
  border-radius: 6px;
  border: 2px solid var(--bg); /* prevents white halo */
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
::-webkit-scrollbar-thumb:hover{
  background: rgba(11,11,11,.55);
  border-color: var(--bg);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb{
  background: rgba(240,240,240,.30);
  border-color: var(--bg);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{
  background: rgba(240,240,240,.55);
}

/* Full-page wrappers (keep your HTML structure, but make it full page) */
.page-frame{
  min-height: 100vh;
  padding: 0;               /* no outer grey framing */
}

.page{
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: background-color 0.3s ease;
}

/* Left guide lines removed for cleaner layout */

/* We scroll the whole page now */
.page-scroll{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
  padding: var(--page-pad-top) var(--page-pad-x) var(--page-pad-bottom);
}

/* Centering container (content still feels editorial, but page fills viewport) */
.container{
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Top navigation */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 10px 0 16px;
  transition: background-color 0.3s ease;
}

.topbar__inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
}

.brand__link{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration:none;
  color: var(--ink);
  transition: color 0.3s ease;
}

.nav{
  display:flex;
  align-items:center;
  gap: 22px;
  padding-top: 4px;
}

.nav__link{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  text-decoration:none;
  transition: color 0.3s ease;
}

.nav__link:hover{
  text-decoration: underline;
  text-underline-offset: 6px;
}

.nav__link.is-active{
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--rule);
  transform: scale(1.1);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.theme-icon {
  display: block;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* Enforce Brandon typography utilities */
.font-72pt-serif{
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--type-72pt);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.font-72pt-serif-italic{
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: var(--type-72pt);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.font-24pt-sans{
  font-family: var(--sans);
  font-weight: 500; /* DM Sans Medium */
  font-size: var(--type-24pt);
  line-height: 1.25;
}

/* Main content area should grow to push footer down */
main.content {
  flex: 1;
}

/* Footer */
.footer{
  margin-top: auto;
  padding-top: 70px;
}

.footer__topline{
  height:1px;
  background: var(--rule);
  margin-bottom: 22px;
}

.footer__main-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 22px;
}

.footer__label{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.footer__list{
  list-style:none;
  padding:0;
  margin:0;
}
.footer__list a,
.footer__meta a{
  color: var(--ink);
  text-decoration:none;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  transition: color 0.3s ease;
}
.footer__list a:hover,
.footer__meta a:hover{
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer__bottom{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display:flex;
  justify-content:space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__fineprint{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10px;
  color: rgba(11,11,11,.7);
  line-height: 1.4;
  transition: color 0.3s ease;
}

[data-theme="dark"] .footer__fineprint{
  color: rgba(240,240,240,.7);
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  margin: 20px 0;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

[data-theme="dark"] .alert-success {
  background: #1e4620;
  color: #d4edda;
  border-color: #2d5a2e;
}

[data-theme="dark"] .alert-error {
  background: #4a1f20;
  color: #f8d7da;
  border-color: #5a2a2b;
}

.footer__fineprint--right{
  text-align:right;
}

/* CTA + Buttons MUST be 24pt DM Sans Medium */
.button,
.view-more-btn,
.submit-btn,
.view-all-link{
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--type-24pt);
  line-height: 1;
}

/* Footer contact form styling kept clean */
.contact-form .form-group{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 12px;
}
.contact-form label{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.contact-form input,
.contact-form textarea{
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  outline:none;
  transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus{
  border-color: var(--ink);
}

.submit-btn{
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: color 0.3s ease;
}
.submit-btn:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Responsive */
@media (max-width: 980px){
  :root{ --page-pad-x: 20px; }
  .footer__main-grid{ grid-template-columns: 1fr; }
  .footer__fineprint--right{ text-align:left; }
}

/* ---------- Light animations utilities ---------- */
@keyframes fadeInBase{
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUpBase{
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popInBase{
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade{
  animation: fadeInBase 0.7s ease both;
}
.anim-up{
  animation: fadeUpBase 0.7s ease both;
}
.anim-pop{
  animation: popInBase 0.35s ease both;
}
