/* =========================================================
   tomtezins.com — static rebuild (from Avada/WordPress)
   Colors and type match the original Avada theme settings.
   ========================================================= */
@import url('/fonts/fonts.css');

:root {
  --dark: #323643;        /* header, footer, dark box */
  --slate: #4f5569;       /* footer top border */
  --text: #515151;        /* body copy */
  --heading: #323643;
  --blue: #0047ab;        /* links, buttons */
  --blue-dark: #00337d;
  --nav: #d8d8d8;
  --nav-active: #00a5ff;
  --max: 1170px;
  --gutter: 4%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font: 400 15px/24px 'Open Sans', Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--nav-active); outline-offset: 2px; }

h1, h2, h3, h4, h5, .h3, .h4 { font-family: 'Roboto', Arial, sans-serif; color: var(--heading); }
h1 { font-size: 64px; font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 50px; font-weight: 500; line-height: 1.2; margin: .5em 0 .3em; }
h3, .h3 { font-size: 40px; font-weight: 700; line-height: 1.3; margin: 1em 0 .6em; }
h4, .h4 { font-size: 30px; font-weight: 700; line-height: 1.5; margin: 0 0 1em; }
p { margin: 0 0 20px; }
.subtitle { display: block; font-weight: 400; font-size: 20px; margin-top: .4em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: var(--blue); padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }
.center { text-align: center; }
.center img { margin-left: auto; margin-right: auto; }
.small { font-size: 14px; }

/* ---------- Header / nav ---------- */
.site-header { background: var(--dark); position: sticky; top: 0; z-index: 50; }
.header-inner {
  max-width: 1300px; margin: 0 auto; padding: 21px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo img { width: 204px; height: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; justify-content: flex-end; }
.site-nav a {
  font: 400 13px/1.4 'Montserrat', Arial, sans-serif; letter-spacing: 1px;
  color: var(--nav); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--nav-active); }
.icon-x { width: 13px; height: 13px; flex: none; }
.nav-toggle { display: none; }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 60px 20px 70px; }
.cols { display: grid; gap: 40px var(--gutter); align-items: start; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2-1 { grid-template-columns: 2fr 1fr; }
.cols-1-1 { grid-template-columns: 1fr 1fr; }
.cols-2-3 { grid-template-columns: 2fr 3fr; }
figure { margin: 0 0 30px; }
figcaption { text-align: center; margin-top: 30px; }

/* Faint willow-drawing backgrounds used behind content on several pages */
/* Applied to the content column (not the full-width band) so the drawing stays the size of the content area, like the original */
.bg-willow > .container { background-repeat: no-repeat; background-size: cover; }
.bg-home   > .container { background-image: url('/images/home2-bg.webp'); background-position: right bottom; }
.bg-book   > .container { background-image: url('/images/book-bg.webp');   background-position: left bottom; }
.bg-author > .container { background-image: url('/images/author2-bg.webp'); background-position: left top; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--blue); color: #fff; text-decoration: none; border: 0; cursor: pointer;
  font: 400 14px/1 'Montserrat', Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase;
  padding: 15px 29px; transition: background .2s;
}
.button:hover, .button:focus-visible { background: var(--blue-dark); color: #fff; }
.button-icon { padding: 0; }
.button-icon .icon-x { width: 14px; height: 14px; box-sizing: content-box; padding: 14px 14px; border-right: 1px solid rgba(255,255,255,.35); }
.button-icon span { padding: 15px 29px 15px 16px; }

/* ---------- Home ---------- */
.home-hero { position: relative; background: var(--dark); }
.home-hero img { width: 100%; height: clamp(260px, 42.7vw, 800px); object-fit: cover; }
.scroll-down {
  position: absolute; left: 50%; bottom: 30px; width: 36px; height: 36px; margin-left: -18px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(.7);
}
.home #intro { padding: 50px 0 55px; }
.home #intro .container { padding-top: 50px; padding-bottom: 60px; }
.dark-box { background: var(--dark); border: 1px solid #d6d6d6; padding: 20px; color: #fff; }
.dark-box h2 { color: #fff; font-weight: 700; margin-top: .4em; }
.dark-box em { color: #fff; }
.home #intro h3 { margin-top: .6em; }
.home #intro .center img { margin-bottom: 20px; }
.home #intro .center em { display: block; }

/* ---------- Meet the Author ---------- */
.author-name { margin-top: 1em; }

/* ---------- Te' Time ---------- */
.video { position: relative; aspect-ratio: 16 / 9; max-width: 600px; background: #000; margin-bottom: 16px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Reflections ---------- */
.foreword { margin-bottom: 0; }
.foreword-sub { font-size: 28px; margin-top: 0; }
.sidebar-quote { margin: 30px 0 50px; }
aside > img { margin-bottom: 0; }

/* ---------- Galleries / carousel ---------- */
.gallery { max-width: 690px; }
.gallery-title { font-size: 19px; font-weight: 400; line-height: 1.5; text-align: center; margin: 0 0 15px; }
.carousel { position: relative; }
.carousel .slides {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  align-items: center;
}
.carousel .slides::-webkit-scrollbar { display: none; }
.carousel .slide { flex: 0 0 100%; scroll-snap-align: center; }
.carousel .slide img { margin: 0 auto; max-height: 85vh; width: auto; } /* keeps tall panels on-screen in landscape */
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 60px; border: 0; cursor: pointer;
  background: rgba(50,54,67,.75); color: #fff; font-size: 36px; line-height: 1;
}
.carousel-prev { left: 0; } .carousel-next { right: 0; }
.carousel-prev:hover, .carousel-next:hover { background: var(--dark); }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.dot { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; position: relative; }
.dot::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #c4c4c4; }
.dot[aria-current="true"]::after { background: var(--dark); }

/* ---------- Lightbox ---------- */
.lightbox { display: block; cursor: zoom-in; }
dialog.lightbox-dialog { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; }
dialog.lightbox-dialog::backdrop { background: rgba(0,0,0,.85); }
dialog.lightbox-dialog img { max-width: 95vw; max-height: 90vh; width: auto; height: auto; }
dialog.lightbox-dialog button {
  position: fixed; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1;
}

/* ---------- Converse (email) ---------- */
.converse-email { max-width: 640px; }
.converse-email .email-line { margin: 30px 0 14px; }
.converse-email .email-text { font-size: 16px; color: var(--heading); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark); border-top: 10px solid var(--slate); color: var(--nav);
  text-align: center; padding: 22px 20px 30px; font-size: 13px;
}
.site-footer p { margin: 0 0 18px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--blue) !important;
}
.footer-x .icon-x { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site-nav ul { gap: 4px 18px; }
}
@media (max-width: 960px) {
  .header-inner { padding: 14px 20px; flex-wrap: wrap; }
  .logo img { width: 150px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
  }
  .nav-toggle .bar { display: block; height: 2px; background: var(--nav); }
  .site-nav { display: none; width: 100%; }
  .site-nav.open {
    display: block;
    /* keep a tall menu scrollable on short screens (phone in landscape) */
    max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto;
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 6px 0 10px; }
  .site-nav li { border-top: 1px solid rgba(255,255,255,.08); }
  .site-nav a { padding: 12px 0; font-size: 14px; width: 100%; }

  .cols-3, .cols-2-1, .cols-1-1, .cols-2-3 { grid-template-columns: 1fr; }
  .cols > div, .cols > aside { max-width: 640px; margin: 0 auto; width: 100%; }
  h1 { font-size: 46px; }
  h2 { font-size: 38px; }
  h3, .h3 { font-size: 32px; }
  h4, .h4 { font-size: 24px; }
  .foreword-sub { font-size: 22px; }
  .container { padding: 40px 20px 50px; }
}
@media (max-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  h3, .h3 { font-size: 26px; }
  .home #intro { padding: 20px 0; }
  .carousel-prev, .carousel-next { width: 30px; height: 50px; font-size: 30px; }
}
