/*
Theme Name: byuyenha Editorial
Theme URI: https://byuyenha.com/
Author: Uyen Nha Cao
Description: A calm, image-led editorial theme for travel notes, everyday life, books, and ideas.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: byuyenha-editorial
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap');

:root {
  --paper: #f6f4ee;
  --paper-bright: #fbfaf6;
  --ink: #244d42;
  --ink-soft: #58716a;
  --line: #d8d3c8;
  --sage: #e5ebe3;
  --sand: #e4dac9;
  --clay: #b97b67;
  --white: #fffdf8;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--sand); color: var(--ink); }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  white-space: nowrap;
  width: 1px;
}

.site-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  min-height: 98px;
  margin: 0 auto;
  padding: 14px 48px;
  border-bottom: 1px solid rgba(216, 211, 200, .78);
  background: rgba(246, 244, 238, .94);
  backdrop-filter: blur(14px);
}
.site-logo { display: block; width: 184px; }
.site-logo img {
  width: 184px;
  height: 64px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  filter: saturate(.7) sepia(.08);
  transition: opacity .3s ease, transform .5s cubic-bezier(.22,.7,.25,1);
}
.site-logo:hover img { opacity: .76; transform: translateY(-1px); }
.site-nav { display: flex; align-items: center; gap: 34px; }
.nav-item { position: relative; }
.nav-link,
.instagram-link,
.menu-link,
.section-label,
.story-meta,
.story-link,
.filter-button,
.footer-meta {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  transition: color .25s ease;
}
.nav-link:hover, .instagram-link:hover { color: var(--clay); }
.nav-link svg { width: 12px; height: 12px; }
.sub-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -18px;
  display: grid;
  min-width: 176px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper-bright);
  box-shadow: 0 14px 32px rgba(36, 77, 66, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .2s ease, transform .2s ease;
}
.nav-item:hover .sub-menu,
.nav-item:focus-within .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sub-menu a {
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.sub-menu a:hover { color: var(--clay); }
.instagram-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.instagram-link svg { width: 15px; height: 15px; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.mobile-panel {
  position: fixed;
  inset: 98px 0 auto;
  z-index: 35;
  display: none;
  padding: 28px 24px 34px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-bright);
  box-shadow: 0 16px 30px rgba(36, 77, 66, .08);
}
.mobile-panel.is-open { display: block; }
.mobile-links { display: grid; gap: 18px; }
.menu-link {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--ink);
}
.mobile-sub-links { display: grid; gap: 9px; padding: 8px 0 4px 14px; }
.mobile-sub-links a { font: 9px var(--mono); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-soft); }

.container { max-width: 1440px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .88fr);
  gap: 80px;
  min-height: 780px;
  padding-top: 96px;
  padding-bottom: 120px;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; }
.section-label { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.section-label .number { color: var(--clay); }
.section-label .rule { width: 28px; height: 1px; background: var(--line); }
.display-title,
.section-title,
.article-title,
.quote {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .88;
}
.display-title {
  max-width: 900px;
  margin: 30px 0 0;
  font-size: clamp(64px, 9.4vw, 150px);
}
.display-title .accent,
.section-title .accent { color: var(--clay); font-style: italic; }
.display-title .indent { margin-left: 13%; }
.hero-description {
  max-width: 435px;
  margin: 38px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 34px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ink);
  font: 10px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: gap .25s ease, color .25s ease;
}
.text-link:hover { gap: 17px; color: var(--clay); }
.text-link svg { width: 16px; }
/* Strip native browser button chrome so a <button class="text-link">
   matches the plain underlined look of the <a class="text-link"> links. */
button.text-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 0 0 9px;
}
button.text-link:hover { border-color: var(--clay); }

.hero-note { font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.hero-collage { position: relative; height: 560px; }
.hero-image-main,
.hero-image-inset { position: absolute; overflow: hidden; background: var(--sage); }
.hero-image-main { top: 0; right: 0; width: 78%; height: 76%; }
.hero-image-inset { bottom: 0; left: 0; z-index: 2; width: 48%; height: 48%; border: 14px solid var(--paper); }
.image-lift { width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.22,.7,.25,1), filter .65s ease; }
a:hover .image-lift, .story-trigger:hover .image-lift { transform: scale(1.035); filter: saturate(1.08); }
.hero-stamp {
  position: absolute;
  right: 4%;
  bottom: 10%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(185, 123, 103, .55);
  border-radius: 50%;
  background: rgba(246, 244, 238, .78);
  color: var(--clay);
  font: 12px/1.05 var(--serif);
  text-align: center;
  transform: rotate(-6deg);
  backdrop-filter: blur(4px);
}
.hero-coordinate {
  position: absolute;
  right: 2%;
  top: 80%;
  color: var(--ink-soft);
  font: 9px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.quote-band { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--ink); color: var(--white); }
.quote-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding-top: 46px; padding-bottom: 46px; }
.quote { max-width: 800px; margin: 0; font-size: clamp(28px, 3.1vw, 50px); line-height: 1.04; }
.quote-note { font: 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--sand); }
.section { padding-top: 112px; padding-bottom: 112px; }
.latest-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 80px; }
.section-title { margin: 25px 0 0; font-size: clamp(46px, 5vw, 80px); }
.section-copy { max-width: 465px; margin: 28px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.stories-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-card { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 20px; height: 100%;}
.story-trigger { display: block; width: 100%; padding: 0; margin: 0 0 20px; overflow: hidden; border: 0; background: var(--sage); text-align: left; }
.story-image { 
    display: block;
    position: relative;
    aspect-ratio: 1.16;
    overflow: hidden;
}
.story-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); }
.story-title {
  display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 400 clamp(23px, 2.3vw, 34px)/1.05 var(--serif);
    letter-spacing: -.04em;
    text-align: left;
    transition: color .25s ease;
}
.story-title:hover, .story-card:hover .story-title { color: var(--clay); }
.story-excerpt { display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 360px;
    margin: 12px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.8; }
.story-link { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: auto; padding-top: 18px; color: var(--ink); transition: gap .25s ease, color .25s ease; }
.story-link:hover { gap: 13px; color: var(--clay); }
.story-link svg { width: 14px; }
.soft-band { background: var(--sage); }
.taxonomy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 58px; padding-top: 25px; border-top: 1px solid var(--line); }
.taxonomy-label { margin-right: 12px; font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.filter-button { padding: 9px 12px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); transition: color .25s ease, background .25s ease, border-color .25s ease; }
.filter-button:hover, .filter-button.is-active { border-color: var(--ink); background: var(--ink); color: var(--white); }
.daily-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: start; gap: 96px; }
.daily-image-wrap { position: relative; max-width: 510px; }
.daily-image { aspect-ratio: .9; overflow: hidden; background: var(--sage); }
.daily-callout { position: absolute; right: 40px; bottom: -32px; max-width: 220px; padding: 20px 24px; background: var(--sand); color: var(--ink); font: 18px/1.15 var(--serif); }
.daily-list { max-width: 540px; margin-top: 38px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.daily-list-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.daily-list-item:last-child { border-bottom: 0; }
.daily-list-category { display: block; color: var(--clay); font: 9px var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.daily-list-title { display: block; margin-top: 8px; color: var(--ink); font: 23px/1 var(--serif); letter-spacing: -.03em; transition: color .2s ease; }
.daily-list-item:hover .daily-list-title { color: var(--clay); }
.archive-section { border-top: 1px solid var(--line); background: var(--paper-bright); }
.archive-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.archive-filters { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; max-width: 660px; }
.archive-grid { margin-top: 56px; }
.archive-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 56px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}
.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font: 10px var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.archive-pagination .page-numbers.current,
.archive-pagination .page-numbers:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--white);
}
.archive-pagination .page-numbers.dots {
    border: 0;
    background: transparent;
}


.empty-state { display: none; padding: 64px 0; border-top: 1px solid var(--line); font: 30px var(--serif); color: var(--ink-soft); text-align: center; }
.about-section { background: var(--ink); color: var(--white); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 96px; }
.about-section .section-label { color: rgba(255, 253, 248, .68); }
.about-section .section-label .rule { background: rgba(255, 253, 248, .28); }
.about-mark { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.about-initial { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--sand); border-radius: 50%; color: var(--sand); font: 23px var(--serif); }
.about-name { margin: 0; font: 28px var(--serif); }
.about-role { margin: 5px 0 0; color: var(--sand); font: 9px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.about-lede { max-width: 770px; margin: 0; font: clamp(34px, 4vw, 72px)/1.02 var(--serif); letter-spacing: -.045em; }
.about-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255, 253, 248, .25); }
.about-details p { max-width: 285px; margin: 0; color: rgba(255, 253, 248, .72); font-size: 14px; line-height: 1.9; }
/* =========================================
   Instagram Feed
   ========================================= */

.instagram-feed {
    width: 100%;
    margin-top: 56px;
}

/* Force a clean 4-column grid */
.instagram-feed #sbi_images {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Each Instagram post occupies one equal grid cell */
.instagram-feed #sbi_images .sbi_item {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Make every photo a perfect square */
.instagram-feed #sbi_images .sbi_photo {
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center !important;
}

/* Keep image itself square and cropped */
.instagram-feed #sbi_images .sbi_photo img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Hide anything that can add different heights */
.instagram-feed #sbi_images .sbi_photo_wrap {
    width: 100% !important;
    height: auto !important;
}

/* Mobile */
@media (max-width: 768px) {

    .instagram-feed {
        margin-top: 40px;
    }

    .instagram-feed #sbi_images {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

.contact-section { border-top: 1px solid var(--line); background: var(--sand); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 96px; }
.contact-title { max-width: 450px; }
.contact-form { display: flex; flex-direction: column; gap: 8px; padding-top: 40px; }
.form-label { margin-top: 10px; color: rgba(36, 77, 66, .68); font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.editorial-input { width: 100%; padding: 9px 0 12px; border: 0; border-bottom: 1px solid rgba(36, 77, 66, .45); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font: 20px var(--serif); }
.editorial-input::placeholder { color: rgba(36, 77, 66, .47); }
.editorial-input:focus { border-color: var(--ink); }
.form-status { margin: 10px 0 0; font: 12px var(--mono); letter-spacing: .04em; color: var(--ink); }
.letter-section { background: var(--paper-bright); }
.letter-top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.letter-form { display: flex; width: 390px; max-width: 100%; border-bottom: 1px solid var(--ink); padding-bottom: 9px; }
.letter-input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font: 11px var(--mono); }
.letter-input::placeholder { color: var(--ink-soft); }
.letter-button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--ink); font: 10px var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.letter-button svg { width: 14px; }
.site-footer { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-top: 40px; }
.footer-logo { width: 212px; height: 118px; margin-left: -12px; object-fit: contain; mix-blend-mode: multiply; filter: saturate(.7) sepia(.08); }
.footer-meta { display: flex; flex-direction: column; align-items: end; gap: 11px; color: var(--ink-soft); text-align: right; }
.footer-meta svg { width: 13px; height: 13px; vertical-align: middle; }
.paper-grain::after { content: ''; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .035; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E"); }

.story-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 22px; background: rgba(36, 77, 66, .55); backdrop-filter: blur(7px); }
.story-modal.is-open { display: flex; }
.story-modal-card { position: relative; width: 100%; max-width: 920px; max-height: 90vh; overflow: auto; background: var(--paper-bright); box-shadow: 0 20px 70px rgba(36, 77, 66, .18); }
.story-modal-grid { display: grid; grid-template-columns: .8fr 1.2fr; }
.story-modal-image { min-height: 300px; background: var(--sage); }
.story-modal-copy { padding: 48px; }
.story-modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: rgba(251, 250, 246, .86); color: var(--ink); }
.story-modal-close:hover { background: var(--ink); color: var(--white); }
.story-modal-title { margin: 18px 0 0; font: clamp(40px, 5vw, 74px)/.88 var(--serif); letter-spacing: -.05em; }
.story-modal-excerpt { margin: 24px 0 0; color: var(--ink); font: 23px/1.3 var(--serif); }
.story-modal-note { display: flex; gap: 12px; margin: 28px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.single-article { max-width: 980px; margin: 0 auto; }
.article-title { max-width: 780px; margin-top: 32px; }
.single-content { max-width: 820px; margin: 60px auto 0; }
.single-featured { max-height: 660px; overflow: hidden; margin-bottom: 54px; background: var(--sage); }
.single-featured img { width: 100%; height: auto; }
.entry-content { color: var(--ink-soft); font-size: 17px; line-height: 1.9; }
.entry-content h2, .entry-content h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.entry-content h2 { margin-top: 54px; font-size: 42px; }
.entry-content h3 { margin-top: 40px; font-size: 32px; }
.entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--clay); text-underline-offset: 4px; }
.entry-content blockquote { margin: 40px 0; padding: 10px 0 10px 24px; border-left: 1px solid var(--clay); color: var(--ink); font: 28px/1.25 var(--serif); }
/* ARTICLE IMAGES */
.entry-content img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 32px 0;
}

.entry-content figure,
.entry-content .wp-caption,
.entry-content figure.wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 32px 0;
}

.entry-content figure img,
.entry-content .wp-caption img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

 /* WORDPRESS BLOCK GALLERIES */
.entry-content .wp-block-gallery {
    display: grid !important;
    width: 100% !important;
    margin: 32px 0 !important;
    gap: 16px !important;
}

/* Two-column gallery */
.entry-content .wp-block-gallery.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Three-column gallery */
.entry-content .wp-block-gallery.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Individual photos */
.entry-content .wp-block-gallery > .wp-block-image {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Images inside the gallery */
.entry-content .wp-block-gallery > .wp-block-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Mobile */
@media (max-width: 700px) {
    .entry-content .wp-block-gallery.columns-2,
    .entry-content .wp-block-gallery.columns-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .entry-content .wp-block-gallery.columns-2,
    .entry-content .wp-block-gallery.columns-3 {
        grid-template-columns: 1fr !important;
    }
}

.entry-content .wp-caption-text,
.entry-content figcaption {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 13px;
    font-style: italic;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-style: italic;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

/* ---------------------------------------------------------
   TABLET / SMALL DESKTOP
   --------------------------------------------------------- */

@media (max-width: 1100px) {

    .site-header {
        padding-left: 30px;
        padding-right: 30px;
    }

    .container {
        padding-left: 30px;
        padding-right: 30px;
    }

    .site-nav {
        gap: 22px;
    }

    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .85fr);
        gap: 45px;
        min-height: 680px;
        padding-top: 70px;
        padding-bottom: 90px;
    }

    .display-title {
        font-size: clamp(58px, 8vw, 110px);
    }

    .latest-grid,
    .daily-grid,
    .contact-grid {
        gap: 55px;
    }

    .about-grid {
        gap: 60px;
    }

    .stories-grid {
        gap: 24px;
    }

    .story-title {
        font-size: clamp(22px, 2.5vw, 30px);
    }

    .daily-callout {
        right: 20px;
    }

    .story-modal-copy {
        padding: 40px;
    }
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    /* HEADER */

    .site-header {
        min-height: 82px;
        padding: 10px 24px;
    }

    .site-logo,
    .site-logo img {
        width: 165px;
    }

    .site-logo img {
        height: 60px;
    }

    .site-nav,
    .header-instagram {
        display: none;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
    }

    .mobile-panel {
        inset: 82px 0 auto;
        padding: 28px 24px 34px;
    }


    /* GLOBAL CONTAINER */

    .container {
        padding-left: 24px;
        padding-right: 24px;
    }


    /* HERO */

    .hero {
        grid-template-columns: 1fr;
        gap: 55px;
        min-height: 0;
        padding-top: 65px;
        padding-bottom: 85px;
    }

    .hero-copy {
        display: block;
    }

    .display-title {
        max-width: 900px;
        margin-top: 25px;
        font-size: clamp(60px, 11vw, 105px);
        line-height: .9;
    }

    .display-title .accent {
        display: inline;
    }

    .hero-description {
        max-width: 600px;
        margin-top: 30px;
        font-size: 14px;
        line-height: 1.8;
    }

    .hero-actions {
        margin-top: 28px;
    }

    .hero-collage {
        width: 100%;
        max-width: 680px;
        height: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image-main {
        width: 78%;
        height: 100%;
    }

    .hero-image-inset {
        width: 48%;
        height: 55%;
    }


    /* QUOTE */

    .quote-inner {
        grid-template-columns: 1fr;
        gap: 25px;
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .quote {
        max-width: 900px;
        font-size: clamp(24px, 4vw, 38px);
        line-height: 1.25;
    }

    .quote-label {
        position: static;
        transform: none;
        display: block;
    }


    /* GENERAL SECTIONS */

    .section {
        padding-top: 90px;
        padding-bottom: 90px;
    }


    /* LATEST */

    .latest-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .stories-grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    /* WANDERINGS */

    .archive-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 25px;
    }

    .stories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-row {
        margin-top: 45px;
    }


    /* DAILY LIFE */

    .daily-grid {
        grid-template-columns: 1fr;
        gap: 70px;
    }

    .daily-image-wrap {
        width: 100%;
        max-width: 620px;
    }

    .daily-image {
        aspect-ratio: 1 / .85;
    }

    .daily-callout {
        right: 25px;
        bottom: -25px;
    }

    .daily-list {
        max-width: none;
    }


    /* INSTAGRAM */

    .instagram-heading {
        display: flex;
        align-items: flex-end;
    }

    .instagram-feed {
        margin-top: 40px;
    }

    .instagram-feed #sbi_images {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }


    /* CONTACT */

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .contact-form {
        padding-top: 0;
    }


    /* NEWSLETTER */

    .letter-top {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 35px;
    }

    .letter-form {
        width: 100%;
        max-width: 500px;
    }


    /* FOOTER */

    .site-footer {
        align-items: flex-start;
    }


    /* MODAL */

    .story-modal {
        padding: 18px;
    }

    .story-modal-card {
        max-height: 92vh;
    }

    .story-modal-grid {
        grid-template-columns: 1fr 1fr;
    }

    .story-modal-copy {
        padding: 35px;
    }

    .story-modal-title {
        font-size: clamp(36px, 6vw, 60px);
    }

    .story-modal-excerpt {
        font-size: 20px;
    }


    /* ARTICLE */

    .single-article {
        max-width: 100%;
    }

    .single-content {
        max-width: 820px;
        margin-top: 45px;
    }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 600px) {

    /* HEADER */

    .site-header {
        min-height: 76px;
        padding: 8px 18px;
    }

    .site-logo {
        width: 150px;
    }

    .site-logo img {
        width: 150px;
        height: 56px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-panel {
        inset: 76px 0 auto;
        padding: 25px 20px 30px;
    }

    .menu-link {
        font-size: 25px;
    }


    /* CONTAINER */

    .container {
        padding-left: 18px;
        padding-right: 18px;
    }


    /* HERO */

    .hero {
        gap: 42px;
        padding-top: 45px;
        padding-bottom: 65px;
    }

    .display-title {
        max-width: 100%;
        margin-top: 22px;
        font-size: clamp(48px, 14.5vw, 76px);
        line-height: .91;
        letter-spacing: -.065em;
    }

    /*
     * Allow the tagline to wrap naturally on small screens.
     */
    .display-title .accent {
        display: inline;
        white-space: normal;
    }

    .hero-description {
        max-width: 100%;
        margin-top: 26px;
        font-size: 14px;
        line-height: 1.75;
    }

    .hero-actions {
        margin-top: 25px;
    }

    /*
     * Simplify the collage on phones.
     */
    .hero-collage {
        height: 390px;
        width: 100%;
    }

    .hero-image-main {
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
    }

    .hero-image-inset {
        bottom: 0;
        left: 0;
        width: 52%;
        height: 48%;
        border-width: 8px;
    }

    .hero-stamp {
        width: 70px;
        height: 70px;
        font-size: 9px;
    }

    .hero-coordinate {
        right: 0;
        top: 80%;
        font-size: 7px;
    }


    /* QUOTE */

    .quote-band {
        margin: 0;
    }

    .quote-inner {
        gap: 22px;
        padding-top: 38px;
        padding-bottom: 38px;
    }

    .quote {
        max-width: 100%;
        font-size: 19px;
        line-height: 1.48;
        letter-spacing: -.025em;
    }

    .quote p {
        font-style: normal;
    }

    .quote p + p {
        margin-top: 22px;
    }

    .quote-label {
        font-size: 8px;
        letter-spacing: .18em;
    }


    /* SECTION SPACING */

    .section {
        padding-top: 65px;
        padding-bottom: 65px;
    }

    .section-label {
        gap: 9px;
        font-size: 9px;
    }

    .section-label .rule {
        width: 22px;
    }

    .section-title {
        margin-top: 20px;
        font-size: clamp(40px, 12vw, 58px);
        line-height: .92;
    }

    .section-copy {
        max-width: 100%;
        margin-top: 22px;
        font-size: 13px;
        line-height: 1.8;
    }


    /* LATEST */

    .latest-grid {
        gap: 42px;
    }

    .stories-grid,
    .stories-grid.two {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .story-card {
        padding-top: 16px;
    }

    .story-image {
        aspect-ratio: 1.08;
    }

    .story-title {
        margin-top: 10px;
        font-size: 27px;
        line-height: 1.02;
    }

    .story-excerpt {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.75;
    }


    /* WANDERINGS */

    .archive-heading {
        display: block;
    }

    .archive-heading .section-copy {
        margin-top: 24px;
    }

    .stories-grid {
        margin-top: 40px !important;
    }

    .taxonomy-row {
        align-items: flex-start;
        gap: 8px;
        margin-top: 40px;
        padding-top: 20px;
    }

    .taxonomy-label {
        width: 100%;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .filter-button {
        padding: 8px 10px;
        font-size: 9px;
    }


    /* DAILY LIFE */

    .daily-grid {
        gap: 65px;
    }

    .daily-image-wrap {
        max-width: 100%;
    }

    .daily-image {
        aspect-ratio: .88;
    }

    .daily-callout {
        right: 12px;
        bottom: -22px;
        max-width: 185px;
        padding: 16px 18px;
        font-size: 16px;
        line-height: 1.2;
    }

    .daily-list {
        margin-top: 30px;
    }

    .daily-list-item {
        gap: 15px;
        padding: 17px 0;
    }

    .daily-list-title {
        font-size: 20px;
        line-height: 1.12;
    }

    .daily-list-category {
        font-size: 8px;
    }


    /* INSTAGRAM */

    .instagram-heading {
        display: block;
    }

    .instagram-heading .text-link {
        margin-top: 22px;
    }

    .instagram-feed {
        margin-top: 34px;
    }

    .instagram-feed #sbi_images {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .instagram-feed #sbi_images .sbi_item {
        min-width: 0 !important;
    }

    .instagram-feed #sbi_images .sbi_photo {
        padding-bottom: 100% !important;
    }

    .instagram-note {
        gap: 8px;
        margin-top: 32px;
        font-size: 16px;
        text-align: center;
    }


    /* CONTACT */

    .contact-grid {
        gap: 42px;
    }

    .contact-title {
        max-width: 100%;
    }

    .contact-form {
        gap: 7px;
    }

    .editorial-input {
        font-size: 18px;
    }

    .text-link {
        font-size: 9px;
        letter-spacing: .14em;
    }


    /* NEWSLETTER */

    .letter-top {
        gap: 30px;
        padding-bottom: 35px;
    }

    .letter-form {
        width: 100%;
    }

    .letter-input {
        width: 100%;
        min-width: 0;
        font-size: 10px;
    }

    .letter-button {
        flex-shrink: 0;
        font-size: 9px;
    }


    /* FOOTER */

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-top: 30px;
    }

    .footer-logo {
        width: 175px;
        height: auto;
        margin-left: -8px;
    }

    .footer-meta {
        align-items: flex-start;
        gap: 9px;
        font-size: 8px;
        line-height: 1.5;
        text-align: left;
    }


    /* MODAL */

    .story-modal {
        padding: 10px;
        align-items: center;
    }

    .story-modal-card {
        width: 100%;
        max-height: 94vh;
    }

    .story-modal-grid {
        grid-template-columns: 1fr;
    }

    .story-modal-image {
        min-height: 220px;
        max-height: 280px;
    }

    .story-modal-copy {
        padding: 28px 20px 32px;
    }

    .story-modal-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }

    .story-modal-title {
        margin-top: 14px;
        font-size: 40px;
        line-height: .9;
    }

    .story-modal-excerpt {
        margin-top: 20px;
        font-size: 19px;
        line-height: 1.35;
    }

    .story-modal-note {
        margin: 22px 0;
        font-size: 12px;
        line-height: 1.7;
    }


    /* ARTICLE */

    .article-title {
        margin-top: 24px;
        font-size: clamp(44px, 13vw, 65px);
        line-height: .9;
    }

    .single-content {
        margin-top: 35px;
    }

    .single-featured {
        margin-bottom: 35px;
    }

    .entry-content {
        font-size: 16px;
        line-height: 1.8;
    }

    .entry-content h2 {
        margin-top: 42px;
        font-size: 34px;
    }

    .entry-content h3 {
        margin-top: 32px;
        font-size: 27px;
    }

    .entry-content blockquote {
        margin: 30px 0;
        padding-left: 18px;
        font-size: 22px;
    }

    .entry-content img {
        margin: 22px 0;
    }
}


/* ---------------------------------------------------------
   VERY SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 380px) {

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .site-header {
        padding-left: 15px;
        padding-right: 15px;
    }

    .site-logo,
    .site-logo img {
        width: 140px;
    }

    .display-title {
        font-size: 46px;
    }

    .hero {
        padding-top: 38px;
    }

    .hero-collage {
        height: 340px;
    }

    .quote {
        font-size: 18px;
    }

    .section-title {
        font-size: 38px;
    }

    .daily-callout {
        right: 8px;
        max-width: 165px;
        padding: 14px 15px;
        font-size: 15px;
    }

    .story-title {
        font-size: 25px;
    }

    .letter-button {
        font-size: 8px;
    }
}


/* ---------------------------------------------------------
   ACCESSIBILITY / REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
/* =========================================
   MOBILE LAYOUT FIX
   ========================================= */

@media screen and (max-width: 900px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-header {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Mobile navigation */
    .site-nav,
    .header-instagram {
        display: none !important;
    }

    .menu-toggle {
        display: grid !important;
        place-items: center !important;
        flex-shrink: 0;
    }

    /* Main container */
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* HERO — one column */
    .hero {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 40px !important;
        width: 100%;
        min-height: 0 !important;
        padding-top: 55px;
        padding-bottom: 70px;
    }

    .hero-copy {
        width: 100%;
        min-width: 0;
    }

    .hero-collage {
        width: 100%;
        min-width: 0;
    }

    /* LATEST — one column */
    .latest-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 50px !important;
        width: 100%;
    }

    .latest-grid > * {
        min-width: 0;
        width: 100%;
    }

    /* STORY GRIDS */
    .stories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
    }

    /* Daily Life */
    .daily-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 50px !important;
    }

    /* About */
    .about-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 50px !important;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 50px !important;
    }

    /* Prevent text/content from creating a second column */
    .section-copy,
    .hero-description,
    .story-excerpt,
    .about-lede,
    .contact-title {
        max-width: 100%;
        min-width: 0;
    }

    /* Instagram */
    .instagram-feed #sbi_images {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
/* Desktop & tablet: only show the first 3 */
.wanderings-grid .story-card:nth-child(n+4) {
    display: none;
}

/* Mobile: show all 4, in a 2x2 grid */
@media (max-width: 600px) {
    .wanderings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px;
    }
    .wanderings-grid .story-card:nth-child(n+4) {
        display: block;
    }
}

/* Main Menu font size */

.site-nav .nav-link {
  font-size: 12px;
}

/* Bridge the gap between the nav link and its dropdown so hovering
   through the empty space doesn't close the dropdown before you reach it. */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 176px;
  height: 18px;
}



/* Comments Section */

.comments-section {
    max-width: 760px;
    margin: 64px auto 40px;
    padding-top: 40px;
    border-top: 1px solid #ddd;
}

.comments-section h2,
.comments-section h3 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 24px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.comment-list .comment {
    margin-bottom: 24px;
}

.comment-body {
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 8px;
}

.comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.comment-content {
    line-height: 1.8;
}

.comment-reply-link {
    font-size: 13px;
    text-decoration: underline;
}

/* Comment Form */

.comment-respond {
    margin-top: 40px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: transparent;
    font: inherit;
}

.comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: #252525;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form input[type="submit"]:hover {
    background: #555;
}