/* ============================================================
   Roast Speciality Coffee, Marina — design system
   Palette + type per research/brand-system.md
   ============================================================ */

:root {
  /* Brand tokens */
  --bg:        #FFF8EF;
  --surface:   #FFFFFF;
  --surface-2: #FBF1E3;
  --text:      #271A12;
  --muted:     #7A6654;
  --primary:   #B64A2E;  /* terracotta */
  --primary-d: #97391F;
  --secondary: #17453B;  /* deep green  */
  --accent:    #E7A93B;  /* amber       */
  --border:    #EADCCB;
  --dark:      #221A14;
  --dark-2:    #2E241C;
  --focus:     #E7A93B;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(39,26,18,.06), 0 2px 8px rgba(39,26,18,.05);
  --shadow-md: 0 12px 30px -12px rgba(39,26,18,.22);
  --shadow-lg: 0 30px 60px -20px rgba(39,26,18,.32);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

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

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 9vw, 130px); }

/* Eyebrow / kicker */
.kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--primary);
  display: inline-block;
}
.kicker.center { justify-content: center; }

.lede { color: var(--muted); font-size: 1.12rem; max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55em;
  font-family: var(--body);
  font-weight: 600;
  font-size: .98rem;
  padding: .85em 1.4em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-d); transform: translateY(-2px); }
.btn-dark { background: var(--secondary); color: #fff; }
.btn-dark:hover { background: #0f3329; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.06rem; line-height: 1.05; }
.brand-name small { display: block; font-family: var(--body); font-weight: 500; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 500; font-size: .96rem; position: relative; padding: 4px 0; color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--primary); transition: width .3s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* mobile menu */
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(28px, 5vw, 60px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.1rem); letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lede { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-media { position: relative; }
.hero-media .frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 4/5;
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: -22px; bottom: 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 12px;
}
.hero-badge .stars { color: var(--accent); font-size: 1rem; letter-spacing: 2px; }
.hero-badge .score { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1; }
.hero-badge small { color: var(--muted); font-size: .78rem; display: block; }

/* steam decorative */
.hero-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }

/* ---------- Marquee / info strip ---------- */
.strip { background: var(--secondary); color: #f4ece0; }
.strip-inner { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; padding-block: 18px; text-align: center; }
.strip-item { display: inline-flex; align-items: center; gap: 10px; font-size: .94rem; font-weight: 500; }
.strip-item svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.strip-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); }

/* ---------- Section heading ---------- */
.head { max-width: 60ch; }
.head.center { margin-inline: auto; text-align: center; }
.head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-top: 16px; }
.head p { margin-top: 16px; }

/* ---------- Highlights grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 54px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-img { aspect-ratio: 16/11; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 24px 24px 28px; }
.card-body h3 { font-size: 1.4rem; }
.card-body p { color: var(--muted); margin-top: 10px; font-size: .98rem; }
.card-tag { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 600; }

/* ---------- Feature band ---------- */
.feature { background: var(--dark); color: #f3ebe0; position: relative; overflow: hidden; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.feature .kicker { color: var(--accent); }
.feature .kicker::before { background: var(--accent); }
.feature h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin-top: 18px; }
.feature p { color: rgba(243,235,224,.75); margin-top: 18px; font-size: 1.08rem; }
.feature-media { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.feature-media img { border-radius: var(--radius); width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow-md); }
.feature-media .tall { grid-row: span 2; aspect-ratio: 3/5; }
.feature-media .short { aspect-ratio: 4/3; }
.feature-stats { display: flex; gap: 36px; margin-top: 34px; flex-wrap: wrap; }
.stat .n { font-family: var(--display); font-size: 2.4rem; font-weight: 600; color: var(--accent); line-height: 1; }
.stat .l { font-size: .85rem; color: rgba(243,235,224,.7); margin-top: 8px; letter-spacing: .04em; }

/* ---------- Gallery ---------- */
.gallery { columns: 3; column-gap: 16px; margin-top: 50px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; border-radius: var(--radius); overflow: hidden; position: relative; cursor: zoom-in; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; transition: transform .7s var(--ease); }
.gallery figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(34,26,20,.4), transparent 50%);
  opacity: 0; transition: opacity .4s;
}
.gallery figure:hover::after { opacity: 1; }
.gallery figure:hover img { transform: scale(1.05); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,14,10,.92); display: none; align-items: center; justify-content: center; padding: 4vw; opacity: 0; transition: opacity .3s; }
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lb-btn { position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 76px); align-items: center; }
.about-media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; height: 100%; object-fit: cover; }
.about-media .a { aspect-ratio: 3/4; margin-top: 34px; }
.about-media .b { aspect-ratio: 3/4; }
.about-body h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 16px; }
.about-body p + p { margin-top: 18px; }
.about-body p { color: var(--muted); }
.signature { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--secondary); margin-top: 24px; }

/* ---------- Visit / contact ---------- */
.visit { background: var(--surface-2); }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: 50px; align-items: start; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 38px); box-shadow: var(--shadow-sm); }
.info-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.info-ic svg { width: 20px; height: 20px; }
.info-row h4 { font-family: var(--body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.info-row .v { font-size: 1.06rem; font-weight: 500; margin-top: 4px; }
.info-row .v a:hover { color: var(--primary); }
.info-note { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); position: relative; min-height: 320px; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; filter: saturate(.92) contrast(.98); }
.map-pill { position: absolute; left: 16px; top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 8px; }
.map-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* ---------- Form ---------- */
.form { margin-top: 22px; display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--text);
  padding: 13px 15px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.form-note { font-size: .8rem; color: var(--muted); }
.form-ok { background: color-mix(in srgb, var(--secondary) 10%, transparent); border: 1px solid color-mix(in srgb, var(--secondary) 30%, transparent); color: var(--secondary); padding: 16px 18px; border-radius: 12px; font-weight: 500; display: none; }
.form-ok.show { display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #d9cfc2; padding-block: clamp(48px, 6vw, 80px) 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand-name { color: #fff; }
.footer .brand-name small { color: rgba(255,255,255,.5); }
.footer img.flogo { height: 60px; width: auto; }
.footer h5 { font-family: var(--body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 16px; font-weight: 600; }
.footer a { color: #d9cfc2; display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; }
.footer a:hover { color: var(--accent); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer-about { color: rgba(217,207,194,.7); font-size: .96rem; margin-top: 16px; max-width: 38ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .82rem; color: rgba(217,207,194,.55); }
.footer-bottom .rights { max-width: 60ch; }

/* ---------- Mobile bottom bar ---------- */
.mbar { display: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 460px; margin-inline: auto; }
  .hero-media .frame { aspect-ratio: 5/4; }
  .feature-grid, .about-grid, .visit-grid { grid-template-columns: 1fr; }
  .about-media .a { margin-top: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .nav-call { display: inline-flex; }
  .mobile-menu {
    display: block; position: fixed; inset: 74px 0 0; z-index: 55;
    background: var(--bg); padding: 24px var(--gut);
    transform: translateX(100%); transition: transform .35s var(--ease);
    overflow-y: auto;
  }
  .mobile-menu.open { transform: none; }
  .mobile-menu a { display: block; font-family: var(--display); font-size: 1.7rem; padding: 16px 0; border-bottom: 1px solid var(--border); }
  .mobile-menu .mm-cta { display: grid; gap: 12px; margin-top: 24px; }
  .mobile-menu .mm-cta .btn { width: 100%; }

  .feature-media { grid-template-columns: 1fr 1fr; }
  .about-media { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  /* mobile action bar */
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px -8px rgba(39,26,18,.2);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .mbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; font-size: .72rem; font-weight: 600; color: var(--text); border-radius: 12px; }
  .mbar a svg { width: 22px; height: 22px; color: var(--primary); }
  .mbar a.primary { color: var(--primary); }
  body { padding-bottom: 72px; }
}

@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .hero-badge { left: 12px; }
}
