/* 2.4.0 portal home, related grid and scroll reveal. Loaded after theme.css. */

body { background: var(--background); }

.home-hero,
.home-notice,
.home-news,
.home-reviews,
.home-services,
.home-more,
.home-company {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

.home-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.home-head h2,
.home-services h2,
.related-grid h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  letter-spacing: -0.02em;
}

/* Hero: one statement and the search box, short enough that news shows on the first screen. */
.home-hero { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.home-hero h1 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.home-hero p {
  margin-top: 14px;
  font-size: clamp(1rem, .95rem + .3vw, 1.2rem);
  max-width: 40ch;
}
.home-search {
  display: flex;
  margin-top: 24px;
  max-width: 640px;
  background: var(--card);
  border-radius: 999px;
  padding: 6px;
  outline: 2px solid var(--primary);
}
.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font: inherit;
  font-size: 1rem;
}
.home-search input:focus { outline: none; }
.home-search:focus-within { outline-width: 3px; }
.home-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.home-search button:hover { background: var(--primary-hover); }
.home-search button:active { transform: scale(.97); }
.home-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.home-quick a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: .95rem;
  transition: background var(--motion-fast) var(--ease-standard);
}
.home-quick a:hover { background: var(--muted); }

/* Notice strip */
.home-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 18px;
  margin-bottom: 40px;
  background: var(--secondary);
  border-radius: var(--radius-sm);
}
.home-notice__title { flex: none; font-weight: 700; color: var(--accent); }
.home-notice ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
.home-notice li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-notice a:hover { text-decoration: underline; }
.home-notice time { color: var(--muted-foreground); font-size: .875rem; }

/* News: one lead story and a headline list. */
.home-news { margin-bottom: 56px; }
.home-news__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
}
.home-news__lead { display: block; }
.home-news__lead img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform var(--motion-slow) var(--ease-out);
}
.home-news__lead:hover img { transform: scale(1.02); }
.home-news__lead strong {
  display: block;
  margin-top: 16px;
  font-family: "Noto Serif KR", Georgia, serif;
  font-size: clamp(1.35rem, 1rem + 1.1vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.home-news__lead p { margin-top: 8px; }
.home-news__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.home-news__list a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: background var(--motion-fast) var(--ease-standard);
}
.home-news__list a:hover { background: var(--secondary); }
.home-news__list img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.home-news__list strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.45;
}
.home-news__list time,
.home-more time,
.related-grid time { display: block; color: var(--muted-foreground); font-size: .85rem; }

/* Reviews */
.home-reviews { margin-top: 56px; margin-bottom: 56px; }
.home-reviews__split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.home-reviews__column h3 { font-size: 1.25rem; margin-bottom: 14px; }
.home-reviews__column .button { margin-top: 16px; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Family services: whole fields of colour, one per service. */
.home-services { margin-top: 72px; margin-bottom: 72px; }
.home-services h2 { margin-bottom: 20px; }
.home-services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.home-services__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 160px;
  padding: 22px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-foreground);
  transition: transform var(--motion-fast) var(--ease-standard);
}
.home-services__item:hover { transform: translateY(-4px); }
.home-services__item:active { transform: translateY(0) scale(.98); }
.home-services__item strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.home-services__item span { margin-top: 4px; opacity: .85; font-size: .95rem; }
.home-services__item--owned-shop { background: hsl(156 36% 25%); }
.home-services__item--smartstore { background: hsl(145 63% 28%); }
.home-services__item--instagram { background: hsl(330 55% 40%); }
.home-services__item--pompom { background: hsl(205 55% 34%); }
.home-services__item--dadjoke { background: var(--accent-gold); color: hsl(25 22% 14%); }

/* More news: text-only headlines, two columns on desktop. */
.home-more { margin-top: 56px; margin-bottom: 56px; }
.home-more__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 320px;
  column-gap: 40px;
}
.home-more__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  break-inside: avoid;
  padding: 12px 0;
}
.home-more__list a { font-size: 1.02rem; line-height: 1.5; }
.home-more__list a:hover { color: var(--primary); text-decoration: underline; }
.home-more__list time { flex: none; }

/* Company close */
.home-company { margin-top: 80px; margin-bottom: 64px; }
.home-company__inner {
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius);
  background: var(--foreground);
  color: var(--background);
}
.home-company h2 { color: inherit; font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); letter-spacing: -0.03em; }
.home-company p { margin-top: 12px; max-width: 48ch; font-size: 1.1rem; }
.home-company .hero-actions { margin-top: 24px; }
.home-company .button-secondary { background: transparent; color: var(--background); outline: 2px solid currentColor; }

/* Related grid on articles */
.related-grid { margin: 48px 0; }
.related-grid h2 { margin-bottom: 16px; }
.related-grid__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform var(--motion-slow) var(--ease-out);
}
.related-grid__item:hover img { transform: scale(1.03); }
.related-grid__item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 10px;
  line-height: 1.45;
}

.home-news + .ad-slot,
.home-services + .ad-slot { width: min(1200px, calc(100% - 32px)); margin: 40px auto; }

@media (max-width: 860px) {
  .home-news__grid,
  .home-reviews__split { grid-template-columns: 1fr; gap: 20px; }
  .related-grid__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 520px) {
  .home-hero { padding-top: 24px; }
  .home-search button { padding: 0 16px; }
  .home-news__list a { grid-template-columns: 80px minmax(0, 1fr); padding: 8px 0; }
  .home-news__list img { width: 80px; height: 60px; }
  /* Store reviews swipe sideways on phones instead of stacking four tall cards. */
  .card-grid--2,
  .card-grid--swipe {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .card-grid--2 > *,
  .card-grid--swipe > * { scroll-snap-align: start; }
  .home-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-services__item { min-height: 120px; padding: 16px; }
  .home-services__item strong { font-size: 1.1rem; }
}

/* Scroll reveal: content is hidden only after JS marks the page, so it never stays invisible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .home-services__item,
  .home-news__lead img,
  .related-grid__item img { transition: none; }
}
