/* =========================================================
   Brewlogy 183 — Steam & Stone
   Tactile 3D minimal · cream paper · soft dual shadows
   ---------------------------------------------------------
   Edit the variables below to retune the whole site.
   ========================================================= */

:root {
  /* Palette */
  --cream:        #F2E8D6;
  --cream-soft:   #FBF6EC;
  --cream-warm:   #ECDFC6;
  --espresso:     #2B1D14;
  --espresso-mid: #5C4636;
  --espresso-low: #8B7560;
  --caramel:      #B6804A;
  --caramel-deep: #8E5A2B;
  --open-green:   #6B8E5A;
  --closed-red:   #B85C45;

  --shadow-cool:  0 18px 38px -18px rgba(36, 22, 12, 0.28);
  --shadow-warm:  0 6px 14px -8px  rgba(182, 128, 74, 0.35);
  --shadow-press-cool: 0 8px 18px -12px rgba(36, 22, 12, 0.22);
  --shadow-press-warm: 0 2px 6px -4px  rgba(182, 128, 74, 0.30);

  --emboss:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -2px 6px rgba(110, 78, 45, 0.18),
    0 14px 30px -16px rgba(36, 22, 12, 0.30);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --maxw: 460px;

  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* =========================================================
   BACKGROUND LAYER (supports image OR video)
   ========================================================= */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% 0%, #FBF3E2 0%, #F2E8D6 55%, #E8DBC0 100%);
}
.bg-media { position: absolute; inset: 0; }
.bg-media img,
.bg-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(110, 78, 45, 0.06) 1px, transparent 1.2px);
  background-size: 3px 3px;
}

.bg-media picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-media picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 22px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================================================
   BRAND HEADER
   ========================================================= */
.brand {
  text-align: center;
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.7s ease-out 0.05s forwards;
}

.logo-img {
  width: 320px;
  height: auto;
  max-width: 150%;
  object-fit: contain;
  display: block;
  margin: 0 auto 22px;
  filter: drop-shadow(0 10px 18px rgba(36, 22, 12, 0.18));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: var(--cream-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--espresso-mid);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    var(--shadow-warm),
    var(--shadow-cool);
  margin-bottom: 16px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--espresso-low);
  box-shadow: 0 0 0 0 rgba(107, 142, 90, 0.4);
}
.status-pill[data-state="open"] .status-dot {
  background: var(--open-green);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-pill[data-state="closed"] .status-dot {
  background: var(--closed-red);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(107, 142, 90, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(107, 142, 90, 0.00); }
}

.tagline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  color: var(--espresso-mid);
  max-width: 320px;
  margin: 0 auto 30px;
  letter-spacing: 0.1px;
}

/* =========================================================
   LINK CARDS
   ========================================================= */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 38px;
}

.card {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--cream-soft);
  border-radius: var(--radius-md);
  color: var(--espresso);
  box-shadow: var(--shadow-warm), var(--shadow-cool);
  transition:
    transform 0.35s cubic-bezier(.2,.7,.2,1),
    box-shadow 0.35s cubic-bezier(.2,.7,.2,1),
    background 0.25s ease;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s ease-out forwards;
  animation-delay: calc(0.15s + var(--delay, 0) * 0.06s);
  -webkit-tap-highlight-color: transparent;
}

.card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 1px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, #FFFBF1 0%, #ECDFC6 100%);
  display: grid;
  place-items: center;
  color: var(--caramel-deep);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    inset 0 -2px 4px rgba(110, 78, 45, 0.14),
    0 4px 10px -6px rgba(36, 22, 12, 0.22);
}
.icon-tile svg { width: 22px; height: 22px; }

.card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--espresso);
}
.card-sub {
  font-size: 12.5px;
  color: var(--espresso-low);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-arrow {
  display: grid;
  place-items: center;
  color: var(--espresso-low);
  transition: transform 0.3s ease, color 0.3s ease;
}
.card-arrow svg { width: 18px; height: 18px; }

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px -18px rgba(36, 22, 12, 0.30),
    0 8px 18px -10px  rgba(182, 128, 74, 0.40);
}
.card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--caramel-deep);
}
.card:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-press-warm), var(--shadow-press-cool);
}
.card:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
}

/* =========================================================
   THANK YOU
   ========================================================= */
.thank-you {
  margin: 4px auto 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.7s ease-out 0.7s forwards;
}
.thank-you img {
  max-width: 220px;
  margin: 0 auto;
  filter: drop-shadow(0 14px 22px rgba(36, 22, 12, 0.18));
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--espresso-low);
  padding: 6px 0 20px;
  letter-spacing: 0.2px;
  opacity: 0;
  animation: fade 0.6s ease-out 0.9s forwards;
}
.site-footer p { margin: 0; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }

/* =========================================================
   RESPONSIVE — desktop tuning
   ========================================================= */
@media (min-width: 720px) {
  :root { --maxw: 500px; }
  .container { padding-top: 64px; padding-bottom: 48px; }

  .logo-img    { width: 400px; }
  .tagline     { font-size: 17px; max-width: 360px; }
  .card        { padding: 18px 20px; }
  .card-title  { font-size: 16px; }
  .card-sub    { font-size: 13px; }
}

@media (min-width: 1100px) {
  .container { max-width: 540px; padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   MOBILE BACKGROUND FIX (iOS Safari)
   ---------------------------------------------------------
   - .bg-layer (position: fixed) is the SOLE source of the image
   - NO image on html/body — body backgrounds scroll on iOS Safari
   - bg-layer extended past viewport so address bar show/hide
     transitions never reveal a gap at the top or bottom
   ========================================================= */
@media (max-width: 719px) {
  /* Plain cream behind everything — bg-layer paints the image on top */
  html,
  body {
    background: var(--cream);
  }

  /* Extend the fixed bg-layer 120px past the visible viewport on each side.
     This buffer hides any gap caused by iOS Safari's address bar resizing. */
  .bg-layer {
    inset: -120px 0;
    min-height: calc(100dvh + 240px);
  }

  .bg-media,
  .bg-media picture,
  .bg-media img,
  .bg-media picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
