/* styles.css */
/* ===========================
   FARMHOUSE MOCK — styles.css
   - 2-column tile grid
   - Top two spots are carousels
   - Carousels same size as tiles
   - No crop: images use contain
   - iOS fixed background via .bg-fixed
   - Carousels: TAP ONLY (no swipe/scroll)
   =========================== */

:root{
  --text: #111214;
  --muted: rgba(17,18,20,.72);

  --radius: 26px;
  --tileRadius: 22px;
  --shadow: 0 18px 55px rgba(0,0,0,.18);

  --wrap: min(1100px, calc(100% - 36px));

  --panel: rgba(255,255,255,.72);
  --panelBorder: rgba(255,255,255,.55);

  --btn: rgba(255,255,255,.70);
  --btnBorder: rgba(255,255,255,.55);
  --btnHover: rgba(255,255,255,.88);

  --primary: #e3c08a;
  --primaryHover: #efcf9d;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  overflow-x:hidden;
  background: transparent;
}

img{ max-width:100%; height:auto; display:block; }
button{ font:inherit; color:inherit; }
a{ color:inherit; text-decoration:none; }

/* Fixed background layer */
.bg-fixed{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("./coffee-bg.PNG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

/* Accessibility */
.skip{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:12px; top:12px; width:auto; height:auto;
  padding:10px 12px;
  background: rgba(255,255,255,.95);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

/* Wrap */
.wrap{
  width: var(--wrap);
  margin: 0 auto;
  padding: 24px 0 42px;
}

/* HERO */
.hero{
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  display:flex;
  flex-direction: column;
}

.hero__media{
  width:100%;
  background-image: url("./sf-hero.jpg");
  background-repeat:no-repeat;
  background-position:center;
  background-size: contain; /* no crop */
  background-color: rgba(255,255,255,.06);
  height: clamp(320px, 52vw, 560px);
}

.hero__panel{
  margin: 14px auto 0;
  width: min(820px, calc(100% - 26px));
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--panelBorder);
  box-shadow: 0 18px 55px rgba(0,0,0,.14);
  text-align:center;
}

.hero__logo{
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.14));
}

.hero__desc{
  margin: 0 auto 14px;
  max-width: 60ch;
  color: rgba(17,18,20,.78);
  line-height: 1.35;
  font-size: 14px;
}

.hero__cta{
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn{
  appearance:none;
  border: 1px solid var(--btnBorder);
  background: var(--btn);
  color: rgba(17,18,20,.92);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.btn:hover{ background: var(--btnHover); }
.btn:active{ transform: translateY(1px); }

.btn--primary{
  border-color: rgba(227,192,138,.85);
  background: var(--primary);
}
.btn--primary:hover{ background: var(--primaryHover); }

.hero__meta{
  display:flex;
  justify-content:center;
  gap: 12px;
}

.socialBtn{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.65);
  display:grid;
  place-items:center;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.socialBtn:hover{ background: rgba(255,255,255,.92); }

.socialBtn img{
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* HOURS BANNER (full width, no crop) */
.hoursBanner{
  margin-top: 16px;
  border-radius: var(--tileRadius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  box-shadow: var(--shadow);
}
.hoursBanner__img{
  width: 100%;
  height: auto;
  display:block;
}

/* =======================
   GRID: 2 columns
   ======================= */
.grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

/* Shared card */
.card{
  border-radius: var(--tileRadius);
  overflow:hidden;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: var(--shadow);
}

/* Tiles: images only */
.tile{
  border: 0;
  padding: 0;
  cursor: pointer;
  display:block;
  background: transparent;
}
.tile__img{
  width:100%;
  aspect-ratio: 16 / 9;
  object-fit: contain; /* no crop */
  background: rgba(255,255,255,.10);
}

/* =======================
   CAROUSELS: TAP ONLY
   - no scrolling, no dragging
   - JS moves track via transform
   ======================= */
.carousel{
  position: relative;
  background: rgba(255,255,255,.10);
}

.carousel__viewport{
  width: 100%;
  aspect-ratio: 16 / 9; /* EXACT match with tiles */
  overflow: hidden;      /* ✅ no scroll, no swipe */
  position: relative;
  touch-action: manipulation; /* reduce weirdness on mobile */
}

.carousel__track{
  height: 100%;
  display:flex;
  will-change: transform;
  transition: transform 260ms ease;
}

.carousel__img{
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ no crop */
  background: rgba(255,255,255,.10);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* ✅ ensures taps hit viewport, not the img */
}

/* Dots */
.dots{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  display:flex;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.60);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(17,18,20,.25);
  background: rgba(255,255,255,.55);
  padding: 0;
  cursor: pointer;
}
.dot.is-active{
  background: rgba(227,192,138,.95);
  border-color: rgba(227,192,138,.95);
}

/* MODAL */
.modal[hidden]{ display:none; }
.modal{ position: fixed; inset: 0; z-index: 9999; }

.modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.38);
}

.modal__sheet{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: min(900px, calc(100% - 24px));
  max-height: min(82vh, 760px);
  overflow:hidden;
  border-radius: 22px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.modal__title{ font-weight: 900; letter-spacing: .2px; }

.modal__close{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.75);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor:pointer;
}

.modal__body{
  padding: 16px;
  overflow:auto;
  max-height: calc(min(82vh, 760px) - 64px);
}

.hoursImg{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
}

/* Mobile */
@media (max-width: 760px){
  .bg-fixed{ background-image: url("./bg-mobile.PNG"); }

  .wrap{
    width: min(1100px, calc(100% - 24px));
    padding: calc(14px + env(safe-area-inset-top)) 0 28px;
  }

  /* 1 column on phone */
  .grid{
    grid-template-columns: 1fr;
  }

  .hero__media{
    height: clamp(240px, 62vw, 380px);
  }
}