/* ==========================================================================
   WooGrub — client/css/home.css   (Glasgatan homepage)
   CLIENT LAYER (deploy-excluded). Auto-loaded by the home template via
   client.php's CSS gating; deps locked to [wg-base, wg-layout].

   Consolidated: all four homepage sections live here — generic patterns
   (split-info, hours) and bespoke Glasgatan sections (cloud hero, gradient
   cards). One stylesheet per page template (the project's chosen model).

   Font: Oswald is enqueued by client-enqueue.php and applied below via a
   scoped --wg-font-* override on .wg-front-page — so it overrides fonts for
   the TEMPLATE CONTENT ONLY. Header and footer sit OUTSIDE .wg-front-page
   (painted by wp_body_open / wp_footer as siblings of <main>), so the theme's
   default font is preserved on the chrome.

   Brand colour: --wg-primary / --wg-band-bg from plugin theme settings. The
   --gg-* locals below are reserved for genuinely bespoke values only (cloud
   tile sizing, card gradient stops).
   ========================================================================== */

/* ── Scoped font override — TEMPLATE CONTENT ONLY ──────────────────────────
   Applies Oswald to everything inside the home template via the token system.
   Because header/footer are siblings of .wg-front-page (not descendants),
   they keep the theme default. */
.wg-front-page {
  --wg-font-heading: 'Oswald', system-ui, sans-serif;
  --wg-font-body:    'Oswald', system-ui, sans-serif;
}

/* Shared inner container — generic max-width via spacing tokens. */
.wg-split-info__inner,
.wg-hours__inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--wg-space-6);
}

/* ==========================================================================
   1 · HERO  (bespoke — cloud-tiled background)
   ========================================================================== */
.wg-gg-hero,
.wg-gg-menucards {
  /* Bespoke-only locals — NOT brand colour, NOT font. */
  --gg-hero-bg:        #f9f4ee;   /* Cream base behind the cloud tile */
  --gg-hero-tile:      80px;      /* Cloud tile render size (native 99x48) */
  --gg-card-lunch-a:   #F3B8E4;   /* Lunch gradient (pink -> blue) */
  --gg-card-lunch-b:   #5BB4F0;
  --gg-card-weekend-a: #3B0A6B;   /* Weekend gradient (deep purple -> pink) */
  --gg-card-weekend-b: #E89BD8;
  --gg-section-max:    72rem;
}

/* Shared inner container for the bespoke sections. */
.wg-gg-hero__inner,
.wg-gg-menucards__inner {
  max-width: var(--gg-section-max);
  margin-inline: auto;
  padding-inline: var(--wg-space-6);
}

.wg-gg-hero {
  position: relative;
  background-color: var(--gg-hero-bg);
  overflow: hidden;
}

/* Tiling cloud pattern over the cream base, painted via ::before so no markup
   layer is needed. Path is relative to THIS file (client/css/) -> up one level
   -> client/assets/. */
.wg-gg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url('../assets/glasgatanClouds.png');
  background-repeat: repeat;
  background-size: var(--gg-hero-tile) auto;
  background-position: 0 0;
}

.wg-gg-hero__inner {
  position: relative;       /* above the ::before pattern layer */
  z-index: 1;
  text-align: center;
  padding-block: clamp(var(--wg-space-12), 10vw, var(--wg-space-16));
}

.wg-gg-hero__heading {
  font-family: var(--wg-font-heading);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--wg-text);
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-block: 0;          /* override core heading margins */
}

.wg-gg-hero__heading-sub {
  display: block;
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-block-start: var(--wg-space-2);
}

.wg-gg-hero__inner .wg-gg-hero__lead {
  font-family: var(--wg-font-body);
  color: var(--wg-text);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 600;
  margin-block: var(--wg-space-6) 0;
  margin-inline: auto;   /* centre the box: base `p { max-width:70ch }` otherwise left-positions it */
  text-align: center;
}

.wg-gg-hero__inner .wg-gg-hero__lead--small {
  font-weight: 500;
  margin-block-start: var(--wg-space-4);
  /* same size as the regular lead (inherits font-size from the rule above) */
}

/* CTA - token-driven look on a plain anchor (not a block button). */
.wg-gg-hero__actions {
  display: flex;
  justify-content: center;
  margin-block-start: var(--wg-space-8);
}
.wg-gg-hero__cta {
  display: inline-block;
  padding: var(--wg-space-4) var(--wg-space-8);
  background-color: var(--wg-primary);
  color: var(--wg-text-on-primary);
  font-family: var(--wg-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  border-radius: var(--wg-radius);
  transition: transform var(--wg-transition), background-color var(--wg-transition);
}
.wg-gg-hero__cta:hover {
  background-color: var(--wg-accent);
  color: var(--wg-text-on-primary);   /* re-assert: stop theme a:hover recolouring the text */
  transform: translateY(-1px);
}
.wg-gg-hero__cta:focus-visible {
  outline: 3px solid var(--wg-text);
  outline-offset: 3px;
}

/* ==========================================================================
   2 · SPLIT INFO  (coloured band, diagonal bottom edge)
   ========================================================================== */
.wg-split-info {
  background-color: var(--wg-band-bg);
  color: var(--wg-text-on-primary);
  /* Diagonal bottom edge - slices ~64px off the lower-right */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 0 100%);
  /* Pull the next section up under the diagonal so the page bg fills the cut */
  margin-block-end: -64px;
  padding-block-end: 64px;
}

.wg-split-info__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wg-space-8);
  flex-wrap: wrap;
  /* Cap width and centre so the card and quick-nav sit toward the middle
     rather than hugging the full-bleed edges. */
  max-width: 60rem;
  margin-inline: auto;
  padding-block: clamp(var(--wg-space-8), 6vw, var(--wg-space-12));
}

/* Wait-time card */
.wg-split-info__waitcard {
  background: var(--wg-surface);
  color: var(--wg-text);
  border-radius: var(--wg-radius-lg);
  padding: var(--wg-space-8) var(--wg-space-12);
  text-align: center;
  min-width: 20rem;
  box-shadow: var(--wg-shadow);
}
.wg-split-info__waitcard-label {
  font-family: var(--wg-font-heading);
  font-weight: 700;
  font-size: 1.875rem;
}
.wg-split-info__waitcard-approx {
  font-family: var(--wg-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--wg-text-muted);
  margin-block-start: var(--wg-space-1);
}
.wg-split-info__waitcard-value {
  font-family: var(--wg-font-heading);
  font-size: 3rem;
  font-weight: 400;
  margin-block-start: var(--wg-space-1);
}
.wg-split-info__waitcard-num { font-variant-numeric: tabular-nums; }
.wg-split-info__waitcard-unit { font-size: 0.55em; margin-inline-start: 0.25em; }

/* Quick-nav links */
.wg-split-info__quicknav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--wg-space-4);
  text-align: right;
}
.wg-split-info__quicknav-link {
  font-family: var(--wg-font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--wg-text-on-primary);
  text-decoration: none;
  transition: opacity var(--wg-transition);
}
.wg-split-info__quicknav-link:hover { opacity: 0.75; }
.wg-split-info__quicknav-link:focus-visible {
  outline: 3px solid var(--wg-text-on-primary);
  outline-offset: 3px;
}

/* ==========================================================================
   3 · OPENING HOURS
   ========================================================================== */
.wg-hours {
  background-color: var(--wg-bg);
  text-align: center;
}
.wg-hours__inner {
  /* Extra top padding for breathing room: the split-info band's -64px overlap
     pulls this section up under the diagonal, so the top needs more than the
     bottom to give the title clear space. (Spacing scale tops out at -16 = 4rem,
     so the larger top max is an explicit rem.) */
  padding-block-start: clamp(var(--wg-space-16), 10vw, 6rem);
  padding-block-end: clamp(var(--wg-space-12), 8vw, var(--wg-space-16));
}
.wg-hours__title {
  font-family: var(--wg-font-heading);
  font-weight: 600;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  text-transform: uppercase;
  text-align: center;
  color: var(--wg-text);
  margin-block: 0;
}
.wg-hours__list {
  margin-block-start: var(--wg-space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wg-space-6);
}
.wg-hours__days {
  font-family: var(--wg-font-heading);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  text-transform: uppercase;
  text-align: center;
  color: var(--wg-text);
  margin-block: 0;
}
.wg-hours__time {
  font-family: var(--wg-font-heading);   /* assert: theme p rules otherwise override the inherited font */
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  text-transform: uppercase;
  text-align: center;
  color: var(--wg-text);
  margin-block-start: var(--wg-space-1);
}
.wg-hours__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: none;
}
.wg-hours__list > * { margin-block: 0; }

/* ==========================================================================
   4 · MENU CARDS  (bespoke — gradient PDF links)
   ========================================================================== */
.wg-gg-menucards {
  background-color: var(--wg-surface);
}
.wg-gg-menucards__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--wg-space-6);
  padding-block: clamp(var(--wg-space-10), 7vw, var(--wg-space-16));
}

.wg-gg-menucard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 16rem;
  padding: var(--wg-space-10);
  border-radius: var(--wg-radius-lg);
  text-decoration: none;
  color: #FFFFFF;
  box-shadow: var(--wg-shadow-lg);
  transition: transform var(--wg-transition), box-shadow var(--wg-transition);
}
.wg-gg-menucard:hover {
  transform: translateY(-4px);
  box-shadow: var(--wg-shadow-overlay);
  color: #FFFFFF;   /* keep text colour unchanged on hover (block theme a:hover) */
}
.wg-gg-menucard:focus-visible {
  outline: 3px solid var(--wg-text);
  outline-offset: 4px;
}
.wg-gg-menucard--lunch {
  background-image: linear-gradient(135deg, var(--gg-card-lunch-a), var(--gg-card-lunch-b));
}
.wg-gg-menucard--weekend {
  background-image: linear-gradient(135deg, var(--gg-card-weekend-a), var(--gg-card-weekend-b));
}
.wg-gg-menucard__title {
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
.wg-gg-menucard__meta {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  margin-block-start: var(--wg-space-2);
}
.wg-gg-menucard__cta {
  font-size: 0.85rem;
  font-weight: 700;
  margin-block-start: var(--wg-space-4);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 48rem) {
  .wg-split-info__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .wg-split-info__quicknav {
    align-items: center;
    text-align: center;
  }
  /* Lighter diagonal on small screens */
  .wg-split-info {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
    margin-block-end: -32px;
    padding-block-end: 32px;
  }
  .wg-gg-menucards__inner {
    grid-template-columns: 1fr;
  }
  /* Cards are full-width on mobile, so the text can be larger than the fluid
     clamp's small end. These desktop-untouched overrides only raise mobile. */
  .wg-gg-menucard__title {
    font-size: 2.5rem;
  }
  .wg-gg-menucard__meta {
    font-size: 1.625rem;
  }
  .wg-gg-menucard__cta {
    font-size: 1rem;
  }
}

/* -- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .wg-gg-hero__cta,
  .wg-gg-menucard { transition: none; }
  .wg-gg-hero__cta:hover,
  .wg-gg-menucard:hover { transform: none; }
}
