/* ==========================================================================
   Sabell Books — shared stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600&display=swap');

:root{
  --ink:        #14181A;
  --teal:       #167685;
  --teal-deep:  #0E525C;
  --paper:      #F6F3EC;
  --paper-dim:  #EDE8DB;
  --brass:      #B08D57;
  --slate:      #5C6669;
  --line:       rgba(20,24,26,0.12);

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

h1, h2, h3, h4{
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}

p{ margin: 0; }

:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}

.site-header::before{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(246,243,236,0.92);
  backdrop-filter: blur(8px);
  z-index: -1;
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img{ height: 40px; width: 40px; border-radius: 6px; }

.brand-text{
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand-text small{
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--slate);
  margin-top: 1px;
}

nav.main-nav{
  display: flex;
  align-items: center;
  gap: 36px;
}

nav.main-nav a{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

nav.main-nav a.active{ color: var(--teal); }

nav.main-nav a::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav.main-nav a:hover::after{ transform: scaleX(1); }

.nav-cta{
  font-size: 14.5px;
}

.menu-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span{
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- Marquee ---------- */

.marquee{
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--teal);
  border-bottom: 1px solid var(--teal);
}

.marquee-track{
  display: inline-flex;
  animation: scroll-left 32s linear infinite;
}

.marquee-track span{
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.02em;
  padding: 16px 36px;
  white-space: nowrap;
}

.marquee-track span::after{
  content: '\2726';
  color: var(--brass);
  font-style: normal;
  margin-left: 36px;
  font-size: 13px;
}

@keyframes scroll-left{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */

.btn{
  display: inline-block;
  padding: 14px 28px;
  border-radius: 3px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

.btn-primary{
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover{ background: var(--teal-deep); }

.btn-outline{
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover{ background: var(--ink); color: var(--paper); }

.btn-light{
  border-color: rgba(246,243,236,0.5);
  color: var(--paper);
}
.btn-light:hover{ background: var(--paper); color: var(--ink); }

/* ---------- Section scaffolding ---------- */

section{ padding: 96px 0; }
.section-tight{ padding: 72px 0; }

.section-head{
  max-width: 640px;
  margin-bottom: 52px;
}

.section-head .kicker{
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 14px;
}

.section-head h2{
  font-size: clamp(30px, 4vw, 42px);
}

.section-head p{
  margin-top: 16px;
  color: var(--slate);
  font-size: 17px;
  max-width: 52ch;
}

.divider{
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

/* ---------- Footer ---------- */

footer{
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 32px;
}

footer .footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(246,243,236,0.14);
}

footer h4{
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 18px;
  opacity: 0.75;
}

footer .foot-brand{
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
}

footer .foot-desc{
  color: rgba(246,243,236,0.65);
  font-size: 14.5px;
  max-width: 30ch;
}

footer ul{ list-style: none; margin: 0; padding: 0; }
footer li{ margin-bottom: 11px; }
footer a{ color: rgba(246,243,236,0.8); font-size: 14.5px; }
footer a:hover{ color: var(--brass); }

.foot-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(246,243,236,0.5);
}

.foot-bottom .socials{ display: flex; gap: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px){
  .wrap{ padding: 0 24px; }
  nav.main-nav{
    position: fixed;
    inset: 84px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  nav.main-nav.open{ transform: translateX(0); }
  .menu-toggle{ display: block; }
  nav.main-nav .nav-cta{
    background: none;
    color: var(--ink) !important;
    padding: 4px 0;
    border-radius: 0;
    font-size: 14.5px !important;
    font-weight: 500;
  }
  nav.main-nav .nav-cta::after{ display: block; }
  nav.main-nav .nav-cta:hover{ background: none; color: var(--teal) !important; }
  footer .footer-grid{ grid-template-columns: 1fr 1fr; }
  section{ padding: 64px 0; }
}

@media (max-width: 560px){
  footer .footer-grid{ grid-template-columns: 1fr; }
  .foot-bottom{ flex-direction: column; gap: 14px; align-items: flex-start; }
}
