/* =========================================================================
   Blog (/blog/ and its article pages) — "The journal". Styles used by these pages only. Classes: .blog-*
   Shared pieces (navbar, cards, buttons, photo band, footer) live in
   components.css. Solid navbar: no data-nav on <body>.
   ========================================================================= */

/* =========================================================================
   Page head: eyebrow + title, each row fades up on load (CSS only)
   ========================================================================= */
@keyframes blog-fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.blog-head {
  padding: 148px 24px 0;
  background: var(--surface-page);
}
.blog-head__row {
  max-width: var(--container-content);
  margin: 0 auto;
  animation: blog-fade-up 800ms var(--ease-out-soft) both;
}
.blog-head__row:nth-child(2) { animation-delay: 110ms; }
.blog-head__title {
  margin-top: 10px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
}
.blog-head__accent {
  margin-left: .03em;
  color: var(--vermillion-500);
  font-size: 1.3em;
  line-height: 1.1;
}

/* =========================================================================
   Post cards (featured + grid). White .eb-card with no padding; the photo
   zooms a touch on hover while the card lifts (.eb-card--lift).
   ========================================================================= */
.blog-list {
  padding: 48px 24px 96px;
  background: var(--surface-page);
}
.blog-card {
  padding: 0;
  overflow: hidden;
}
/* As in the design, the card keeps its resting shadow on hover (its own
   shadow wins over the raised one); only the lift and the photo zoom move. */
.blog-card.eb-card--lift:hover { box-shadow: var(--shadow-card); }

/* Reveal (blog.js sets data-blog-reveal="pending", then "in" on load or
   "in-scroll" on scroll). The design's card transition (.eb-card--lift:
   transform + shadow, 220ms) is the one that plays, so opacity snaps to 1
   and the card rises in 220ms: no fade. Pending has no transition, so hiding
   is instant and the rise starts from the full offset. Cards shown on load
   rise together; posts shown on scroll are staggered 0/90/180ms. */
.blog-card[data-blog-reveal="pending"] {
  opacity: 0;
  transition: none;
}
.blog-feature[data-blog-reveal="pending"] { transform: translateY(30px); }
.blog-post[data-blog-reveal="pending"] { transform: translateY(22px); }
.blog-post:nth-child(2)[data-blog-reveal="in-scroll"] { transition-delay: 90ms; }
.blog-card__photo {
  overflow: hidden;
  background: var(--stucco-300);
}
.blog-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.10) saturate(1.04);
  transition:
    transform 700ms var(--ease-out-soft),
    filter var(--duration-photo) var(--ease-out-soft);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .blog-card:hover .blog-card__img { transform: scale(1.04); }
}

/* A published card: the title is the link and the whole card is its click area (17 Nov 2026, FX-99). */
.blog-card:has(.blog-card__link) { position: relative; }
.blog-card__link { color: inherit; text-decoration: none; }
.blog-card__link::after { content: ""; position: absolute; inset: 0; }
.blog-card__link:focus-visible { outline: 3px solid var(--border-focus); outline-offset: 3px; border-radius: 2px; }
@media (hover: hover) {
  .blog-card__link:hover { color: var(--action-primary); }
}

/* Small status tag ("In progress"). */
.blog-tag {
  padding: 4px 8px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---- Featured post ------------------------------------------------------ */
.blog-feature {
  display: flex;
  align-items: stretch;
  max-width: var(--container-content);
  margin: 0 auto;
}
.blog-feature__photo {
  flex: none;
  align-self: stretch;
  width: 54%;
  min-height: 400px;
}
.blog-feature__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 40px 40px 42px;
}
.blog-feature__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.blog-feature__title {
  margin-top: 14px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.12;
}
.blog-feature__text {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--ink-700);
  font-size: 15px;
  line-height: 1.75;
}
.blog-feature__meta {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .02em;
}

/* ---- Grid of posts ------------------------------------------------------ */
/* Two post cards under the featured one, sharing the row the three used to fill (Oliver, 19 Nov 2026: the breakfast
   article came out). */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--container-content);
  margin: 32px auto 0;
}
.blog-post {
  display: flex;
  flex-direction: column;
}
.blog-post__photo { height: 200px; }
/* The harvest card's photo is upright and the guests sit at the bottom of it: lowered so the table and the people
   show, not just the umbrella (Oliver, 19 Nov 2026). */
.blog-post__photo--umbrella .blog-card__img { object-position: 50% 84%; }
.blog-post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 24px;
}
.blog-post__kicker {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.blog-post__title {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.blog-post__text {
  margin-top: 10px;
  color: var(--ink-700);
  font-size: var(--text-small);
  line-height: 1.7;
}
.blog-post__meta {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: var(--text-micro);
  letter-spacing: .02em;
}

/* =========================================================================
   Article page (/blog/<name>/): a text column 720px wide under the page
   title, one photo at the content width, then sections with short lists.
   Added 17 Nov 2026 (FX-99).
   ========================================================================= */
.blog-article {
  padding: 148px 24px 96px;
  background: var(--surface-page);
}
.blog-article__head,
.blog-article__body {
  max-width: 720px;
  margin: 0 auto;
}
.blog-article__back { margin-bottom: 26px; }
.blog-article__title {
  margin-top: 10px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
}
.blog-article__intro {
  margin-top: 18px;
  color: var(--ink-700);
  font-size: 18px;
  line-height: 1.65;
}
.blog-article__meta {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: .02em;
}
.blog-article__photo {
  max-width: var(--container-content);
  margin: 40px auto 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--stucco-300);
}
.blog-article__photo img {
  display: block;
  width: 100%;
  height: clamp(240px, 42vw, 520px);
  object-fit: cover;
  object-position: 50% 18%; /* keeps the sign's "El Bonita" plate and the train in the crop */
  filter: sepia(.10) saturate(1.04);
}
/* The articles of 18 Nov 2026 (FX-105): each photo's own crop, so its subject stays in the strip. (The breakfast
   article and its "--table" crop came out on 19 Nov 2026 at Oliver's request.) */
.blog-article__photo--umbrella img { object-position: 50% 74%; } /* the umbrella and the guests under it */
.blog-article__photo--pool img { object-position: 50% 58%; }     /* the bottle and glass at the pool's edge */
.blog-article__body {
  margin-top: 40px;
  color: var(--ink-700);
  font-size: var(--text-size-body);
  line-height: 1.75;
}
.blog-article__body h2 {
  margin-top: 44px;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
}
.blog-article__body p { margin-top: 14px; }
.blog-article__list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-hairline);
}
.blog-article__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-hairline);
}
.blog-article__place { color: var(--text-heading); font-weight: var(--weight-semibold); }
.blog-article__dist { color: var(--ink-700); font-size: var(--text-small); white-space: nowrap; }
.blog-article__note { flex-basis: 100%; font-size: var(--text-small); line-height: 1.65; }
.blog-article__end { margin-top: 28px; }

/* =========================================================================
   Closing banner ("Your vacation awaits"): shared photo band, card on the
   left, no eyebrow above the title.
   ========================================================================= */
.blog-banner {
  --card-max: 440px;
  --band-min-mobile: 440px;
}
.blog-banner .eb-photo-band__title { margin-top: 0; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 940px) {
  .blog-feature { flex-direction: column; gap: 0; }
  /* The design's 400px min-height still wins over this height down to 761px. */
  .blog-feature__photo { width: 100%; height: clamp(240px, 50vw, 360px); }
  .blog-feature__copy { padding: 28px 28px 32px; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .blog-head { padding: 120px 20px 0; }
  .blog-article { padding: 120px 20px 72px; }
}

@media (max-width: 760px) {
  /* The design's 11px labels read 12px on phones. */
  .blog-tag,
  .blog-post__kicker { font-size: var(--text-micro); }
  /* As in the reference frames, the footer shows "Blog" on this page on phones. */
  .eb-footer__nav .eb-footer__link--blog { display: inline-flex; }
}

@media (max-width: 760px) and (orientation: landscape) {
  .blog-banner { --band-min-mobile: min(52vh, 400px); }
  /* The design's 40px 20px phone padding is for upright phones only. */
  .blog-banner .eb-photo-band__inner { padding: 48px 24px; }
}

@media (max-width: 600px) {
  .blog-article { padding: 110px 18px 64px; }
  .blog-article__intro { font-size: 17px; }
  .blog-article__photo { margin-top: 28px; }
  .blog-article__body { margin-top: 28px; }
  .blog-head { padding: 110px 18px 0; }
  .blog-head__title { font-size: clamp(34px, 9.5vw, 50px); }
  .blog-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .blog-feature__copy { padding: 24px 20px 28px; }
  .blog-feature__title { font-size: 26px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .blog-head { padding: 96px 24px 0; }
  .blog-article { padding-top: 96px; }
}

/* Phones turned sideways. */
@media (orientation: landscape) and (max-height: 500px) {
  .blog-article { padding: 84px 28px 56px; }
  .blog-head { padding: 84px 28px 0; }
  .blog-list { padding: 28px 28px 56px; }
  .blog-feature { flex-direction: row; }
  .blog-feature__photo { width: 46%; height: auto; min-height: 300px; }
  .blog-feature__copy { padding: 24px 24px 26px; }
  .blog-feature__title { font-size: 24px; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
  .blog-post { height: 100%; }
  .blog-post__photo { height: 180px; }
  /* Card centred and its title centred; the actions row stays left-aligned
     inside the card, as in the design. */
  .blog-banner .eb-photo-band__inner { display: flex; justify-content: center; }
  .blog-banner .eb-photo-band__card { text-align: center; }
}
/* Two post cards to a row only from 568px wide; in a narrower short window (400% zoom is 320 × 256) a card was 124px
   and cut off its title, so one card per row there (WCAG 1.4.10; EB-097, 13 Nov 2026). */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 567px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) {
  .blog-feature__img { object-position: 30% 60%; }
  /* The design pins the revealed featured card in place here, so it does not
     lift on hover (the photo still zooms). The post cards still lift. */
  .blog-feature.eb-card--lift:hover { transform: none; }
}

/* Phones upright. */
@media (max-width: 760px) and (orientation: portrait) {
  .blog-article { padding: 96px 18px 56px; }
  .blog-head { padding: 96px 18px 0; }
  .blog-list { padding: 28px 16px 56px; }
  .blog-feature__photo { height: clamp(220px, 62vw, 280px); min-height: 0; }
  .blog-feature__copy { padding: 22px 18px 24px; }
  .blog-grid { gap: 16px; margin-top: 20px; }
  .blog-post__photo { height: clamp(190px, 52vw, 230px); }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .blog-head__row { animation: none; }
  .blog-card__img { transition: none; }
  .blog-card[data-blog-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
