/* ============================================================
   Coastal Kettle Corn — shared stylesheet
   Warm Central-Coast family business. Caramel + coastal navy.
   ============================================================ */

:root {
  /* Brand palette */
  --caramel:      #D4A24C;
  --caramel-deep: #B07F2E;
  --caramel-soft: #E7C285;
  --navy:         #1F3A5F;
  --navy-deep:    #16293F;
  --navy-soft:    #355A86;
  --red:          #B8341B;
  --red-deep:     #97270F;
  --cream:        #FAF6EE;
  --cream-2:      #F3EADA;
  --cream-3:      #ECDFC8;
  --ink:          #2A2A2A;
  --ink-soft:     #55504A;
  --line:         #E3D7C2;

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

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(31, 58, 95, 0.08);
  --shadow-md: 0 10px 30px rgba(31, 58, 95, 0.12);
  --shadow-lg: 0 24px 60px rgba(31, 58, 95, 0.18);

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--navy);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.section--cream2 { background: var(--cream-2); }
.section--navy { background: var(--navy); color: #EAF0F6; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--caramel-deep);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--caramel);
  display: inline-block;
}
.section--navy .eyebrow { color: var(--caramel-soft); }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 60ch; }
.section--navy .lead { color: #C5D2E0; }

h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); }
h2.section-title { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.center { text-align: center; }
.center .lead, .center .eyebrow { margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--caramel);
  --fg: #2A1C06;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--caramel-deep); }
.btn:active { transform: translateY(0); }
.btn--navy { --bg: var(--navy); --fg: #fff; }
.btn--navy:hover { background: var(--navy-deep); }
.btn--ghost {
  background: transparent;
  --fg: var(--navy);
  border-color: rgba(31,58,95,0.25);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(31,58,95,0.06); border-color: var(--navy); }
.section--navy .btn--ghost { --fg: #fff; border-color: rgba(255,255,255,0.35); }
.section--navy .btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn--lg { padding: 19px 34px; font-size: 1.08rem; }
.btn .ico { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__text span { display: block; font-size: 0.66rem; font-family: var(--body); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--caramel-deep); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.nav a:hover { background: var(--cream-3); color: var(--navy); }
.nav a.is-active { color: var(--navy); font-weight: 600; }
.nav a.is-active::after {
  content:""; display:block; height:2px; width:18px; margin: 3px auto 0; background: var(--caramel); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-tel {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.95rem;
  padding: 8px 6px;
  white-space: nowrap;
}
.header-tel:hover { color: var(--caramel-deep); }
.header-tel .ico { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-sm);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content:""; display:block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position:absolute; top:-6px; }
.nav-toggle span::after  { position:absolute; top: 6px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Photo placeholders (swap with real photos) ---------- */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--caramel-soft), var(--caramel) 55%, var(--caramel-deep));
  color: #fff;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  box-shadow: var(--shadow-sm);
}
.photo--coast { background: linear-gradient(150deg, #5E86AE, var(--navy-soft) 55%, var(--navy)); }
.photo--warm  { background: linear-gradient(140deg, #E8B765, var(--caramel) 50%, var(--red)); }
.photo--cream { background: linear-gradient(150deg, var(--cream-3), var(--caramel-soft)); color: var(--navy); }
.photo::after { /* subtle grain + light flare */
  content:"";
  position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(90% 90% at 10% 100%, rgba(0,0,0,0.18), transparent 60%);
}
.photo__label {
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 500;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(20,30,45,0.55));
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.photo--cream .photo__label { background: linear-gradient(transparent, rgba(31,58,95,0.14)); }
.photo__label .ico { width: 15px; height: 15px; opacity: .9; flex:none; }
.photo[data-ratio="4-3"]  { aspect-ratio: 4 / 3; }
.photo[data-ratio="3-2"]  { aspect-ratio: 3 / 2; }
.photo[data-ratio="1-1"]  { aspect-ratio: 1 / 1; }
.photo[data-ratio="3-4"]  { aspect-ratio: 3 / 4; }
.photo[data-ratio="16-9"] { aspect-ratio: 16 / 9; }

/* Real photo inside a .photo frame — covers the gradient placeholder,
   inherits the frame's aspect-ratio, border-radius, and layout span. */
.photo > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.card__icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--cream-2);
  display: grid; place-items: center;
  margin-bottom: 18px;
  color: var(--caramel-deep);
}
.card__icon .ico { width: 28px; height: 28px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Wave / scallop dividers ---------- */
.wave { display: block; width: 100%; height: auto; }
.wave--flip { transform: scaleY(-1); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #C5D2E0; padding-block: 64px 32px; }
.site-footer a { color: #C5D2E0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer .brand__text { color: #fff; }
.footer-col h4 { color: #fff; font-family: var(--body); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-tel { font-family: var(--display); font-size: 1.5rem; color: #fff !important; font-weight: 600; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.85rem; color: #8FA4BC;
}
.footer-bottom .socials { display: flex; gap: 12px; }
.footer-bottom .socials a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display:grid; place-items:center; }
.footer-bottom .socials a:hover { background: rgba(255,255,255,0.1); }
.footer-bottom .socials .ico { width: 16px; height: 16px; }

/* ---------- Pills / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; color: var(--navy);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--caramel); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .header-tel span { display: none; }
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 22px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
    box-shadow: var(--shadow-md);
  }
  body.nav-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 13px 14px; font-size: 1.05rem; border-radius: var(--r-sm); }
  .nav a.is-active::after { margin-left: 0; }
  .header-actions .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
