/* ==========================================================================
   OO Coffee — neighborhood cafe homepage
   Palette: cream #FAF6F0 · brown #6B4B3A · beige #E6D5C3 · terracotta #C97B5A
            charcoal #3A312B
   ========================================================================== */

:root {
  --cream: #FAF6F0;
  --cream-deep: #F3ECE2;
  --brown: #6B4B3A;
  --brown-dark: #4A3327;
  --beige: #E6D5C3;
  --beige-soft: #EFE3D5;
  --terracotta: #C97B5A;
  --terracotta-dark: #B46646;
  --charcoal: #3A312B;
  --muted: #7A6B60;
  --line: rgba(107, 75, 58, 0.16);
  --shadow-sm: 0 2px 10px rgba(58, 49, 43, 0.06);
  --shadow-md: 0 14px 34px rgba(58, 49, 43, 0.10);
  --shadow-lg: 0 24px 60px rgba(58, 49, 43, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 72px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--brown-dark);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }

a { color: var(--brown); text-decoration: none; }
a:hover { color: var(--terracotta); }

ul, ol { margin: 0 0 1rem; padding-left: 1.1rem; }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brown);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; color: #fff; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--terracotta);
  margin-bottom: 0.9rem;
}
.eyebrow.light { color: var(--beige); }

.note { font-size: 0.9rem; color: var(--muted); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.btn-primary {
  background: var(--brown);
  color: #FFF8F0;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--terracotta); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--brown);
}
.btn-ghost:hover { background: var(--brown); border-color: var(--brown); color: #FFF8F0; transform: translateY(-2px); }
.hero .btn-ghost { color: #F6E8DA; }
.hero .btn-ghost:hover { background: #F6E8DA; border-color: #F6E8DA; color: var(--brown-dark); }

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav-inner {
  position: relative;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--brown-dark); }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 1.12rem; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after, .nav-link.is-current::after { transform: scaleX(1); }
.nav-link.is-current { color: var(--brown-dark); }

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--beige);
  color: var(--brown-dark);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { background: var(--terracotta); color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-dark);
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav.is-open .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; }

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 18% 15%, rgba(201, 123, 90, 0.55) 0%, rgba(201, 123, 90, 0) 55%),
    radial-gradient(90% 80% at 85% 80%, rgba(230, 213, 195, 0.35) 0%, rgba(230, 213, 195, 0) 60%),
    linear-gradient(160deg, #7A5641 0%, #5A3C2D 48%, #3A2A21 100%);
}
.hero-image .grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero-steam {
  position: absolute;
  right: -10%;
  top: -20%;
  width: min(60vw, 520px);
  height: min(60vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(250, 246, 240, 0.22), rgba(250, 246, 240, 0) 68%);
}

.hero-body {
  padding: clamp(88px, 16vw, 168px) 20px clamp(80px, 12vw, 132px);
  color: #FBF3EA;
  max-width: 1140px;
}
.hero-logo {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(250, 246, 240, 0.5);
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: #FBF3EA;
  margin-bottom: 26px;
}
.hero h1 { color: #FFF8F0; max-width: 16ch; margin-bottom: 0.4em; }
.hero-tagline {
  font-size: clamp(1.02rem, 2.2vw, 1.25rem);
  color: rgba(251, 243, 234, 0.86);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  background: var(--beige);
  color: var(--brown-dark);
  padding: 14px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

/* --- Sections ------------------------------------------------------------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 54px); }
.section-lead { color: var(--muted); font-size: 1.02rem; }

/* Photo placeholders (decorative, no external assets) */
.photo, .card-photo, .insta-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--beige-soft);
  display: grid;
  place-items: center;
}
.photo-mark {
  font-family: var(--serif);
  color: rgba(255, 248, 240, 0.78);
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(58, 49, 43, 0.25);
}
.tone-1 { background: linear-gradient(145deg, #8A6349 0%, #5F4232 100%); }
.tone-2 { background: linear-gradient(145deg, #C97B5A 0%, #8A4F38 100%); }
.tone-3 { background: linear-gradient(145deg, #E6D5C3 0%, #BE9C7E 100%); }
.tone-4 { background: linear-gradient(145deg, #A6785C 0%, #6B4B3A 100%); }
.tone-5 { background: linear-gradient(145deg, #D8B899 0%, #A77A58 100%); }
.tone-6 { background: linear-gradient(145deg, #6B4B3A 0%, #3A312B 100%); }
.tone-3 .photo-mark, .tone-5 .photo-mark { color: rgba(58, 49, 43, 0.6); text-shadow: none; }

/* --- About ---------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.about-copy h2 { max-width: 18ch; }
.about-copy p { color: var(--muted); max-width: 52ch; }
.about-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.about-points li {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.about-points strong { font-family: var(--serif); font-weight: 500; color: var(--brown-dark); }
.about-points span { font-size: 0.9rem; color: var(--muted); }

.about-media { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
.about-media figure { margin: 0; }
.photo-tall { aspect-ratio: 3 / 4; box-shadow: var(--shadow-md); }
.photo-short { aspect-ratio: 1 / 1; box-shadow: var(--shadow-md); }

/* --- Menu ----------------------------------------------------------------- */
.menu { background: var(--cream-deep); }

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  margin-bottom: 36px;
  max-width: 100%;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 11px 28px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}
.tab:hover { color: var(--brown-dark); }
.tab.is-active { background: var(--brown); color: #FFF8F0; box-shadow: var(--shadow-sm); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp 0.45s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-photo { border-radius: 0; aspect-ratio: 4 / 3; }
.card-body { padding: 22px 22px 24px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: var(--muted); font-size: 0.93rem; }
.price {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--terracotta);
}

/* --- Location ------------------------------------------------------------- */
.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.map-frame {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #F2E9DD 0%, #E6D5C3 100%);
  box-shadow: var(--shadow-md);
}
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(107, 75, 58, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 75, 58, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
}
.map-road {
  position: absolute;
  background: rgba(250, 246, 240, 0.9);
  box-shadow: 0 0 0 1px rgba(107, 75, 58, 0.08);
}
.map-road-a { left: -10%; right: -10%; top: 58%; height: 26px; transform: rotate(-7deg); }
.map-road-b { top: -10%; bottom: -10%; left: 38%; width: 20px; transform: rotate(5deg); }
.map-pin {
  position: absolute;
  left: 42%;
  top: 46%;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 2px;
  background: var(--terracotta);
  transform: rotate(-45deg);
  box-shadow: 0 10px 20px rgba(58, 49, 43, 0.25);
}
.map-pin i {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--cream);
}
.map-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  background: rgba(250, 246, 240, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brown-dark);
  text-align: center;
}

.location-info h3 { margin-top: 0; }
.location-info h3 + * { margin-top: 0; }
.location-info h3:not(:first-child) { margin-top: 28px; }
.address { font-size: 1.05rem; line-height: 1.6; }
.address-ko { color: var(--muted); font-size: 0.92rem; }
.directions { display: grid; gap: 10px; color: var(--muted); padding-left: 1.2rem; }
.directions strong { color: var(--brown-dark); }
.location-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.copy-status {
  min-height: 1.4rem;
  margin: 10px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--terracotta);
}
.copy-status.is-error { color: #A33B27; }

/* --- Instagram ------------------------------------------------------------ */
.news { background: var(--cream-deep); }
.insta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}
.insta {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.insta-img {
  position: absolute;
  inset: 0;
  border-radius: 0;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.insta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(58, 49, 43, 0.78) 0%, rgba(58, 49, 43, 0.12) 52%, rgba(58, 49, 43, 0) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.insta-caption {
  color: #FFF8F0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  transform: translateY(8px);
  transition: transform 0.35s ease;
}
.insta:hover .insta-img, .insta:focus-visible .insta-img { transform: scale(1.09); }
.insta:hover .insta-overlay, .insta:focus-visible .insta-overlay { opacity: 1; }
.insta:hover .insta-caption, .insta:focus-visible .insta-caption { transform: none; }
.insta-follow { margin: 36px 0 0; text-align: center; }

/* --- Footer --------------------------------------------------------------- */
.footer {
  background: var(--brown-dark);
  color: rgba(250, 246, 240, 0.78);
  padding: clamp(56px, 8vw, 90px) 0 28px;
}
.footer h2, .footer h3 { color: #FFF8F0; }
.footer h3 { font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; margin-bottom: 14px; }
.footer a { color: #F0DECB; }
.footer a:hover { color: var(--terracotta); }
.footer .brand-mark { background: var(--terracotta); color: #FFF8F0; margin-bottom: 18px; }
.footer .note { color: rgba(250, 246, 240, 0.55); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
}
.footer-brand p { max-width: 36ch; }
.status-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(250, 246, 240, 0.1);
  border: 1px solid rgba(250, 246, 240, 0.18);
  font-size: 0.86rem;
  font-weight: 600;
  color: #FFF8F0;
}
.status-badge.is-open { background: rgba(201, 123, 90, 0.26); border-color: rgba(201, 123, 90, 0.5); }

.hours { margin: 0 0 14px; display: grid; gap: 10px; }
.hours > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(250, 246, 240, 0.18);
}
.hours dt { font-weight: 500; }
.hours dd { margin: 0; font-family: var(--serif); color: #FFF8F0; white-space: nowrap; }
.hours .closed dd { color: var(--terracotta); }

.tel { font-family: var(--serif); font-size: 1.15rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(32px, 5vw, 54px);
  padding-top: 20px;
  border-top: 1px solid rgba(250, 246, 240, 0.16);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* --- Reveal on scroll ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: var(--cream);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-link::after { display: none; }
  .nav-link.is-current { color: var(--terracotta); }
  .nav-cta { margin-top: 12px; text-align: center; }

  .about-grid, .location-grid, .footer-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 520px; }
  .map-frame { min-height: 280px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .brand-sub { display: none; }
  .hero-body { padding-top: 76px; padding-bottom: 68px; }
  .hero-logo { width: 62px; height: 62px; font-size: 1.25rem; margin-bottom: 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-ticker { font-size: 0.68rem; letter-spacing: 0.12em; gap: 8px 12px; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1 1 0; padding: 11px 10px; }
  .card-grid { grid-template-columns: 1fr; }
  .insta-grid { grid-template-columns: 1fr 1fr; }
  .insta-overlay { opacity: 1; background: linear-gradient(to top, rgba(58, 49, 43, 0.72) 0%, rgba(58, 49, 43, 0) 58%); }
  .insta-caption { transform: none; font-size: 0.78rem; }
  .about-media { grid-template-columns: 1fr 1fr; }
  .location-actions .btn { flex: 1 1 100%; }
  .footer-bottom { justify-content: flex-start; }
  .hours > div { flex-direction: column; gap: 2px; }
  .map-label { font-size: 0.68rem; letter-spacing: 0.04em; padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
