/* ==========================================================================
   Doc's Sandwich Shop — design system
   Direction: minimal, clean, editorial. Paper + ink + one brick accent.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..800;1,9..144,300..800&display=swap');

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

:root {
  /* Color */
  --paper:      #F7F5EF;
  --paper-2:    #EFEBE1;
  --paper-3:    #E4DED1;
  --ink:        #16150F;
  --ink-70:     #4A473C;
  --ink-45:     #7C776A;
  --ink-20:     #C9C3B4;
  --brick:      #A63A22;
  --brick-dark: #7E2A17;
  --olive:      #4E5A3A;
  --white:      #FFFFFF;

  /* Type */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Satoshi', 'Avenir Next', 'Segoe UI', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  clamp(2.5rem, 5vw, 4rem);
  --text-hero: clamp(3rem, 9vw, 7.5rem);

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-12: 3rem;   --sp-16: 4rem;
  --sp-24: 6rem;   --sp-32: 8rem;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1320px;

  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle paper grain — atmosphere without noise */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--brick); color: var(--paper); }

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

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-45);
  margin: 0;
}

.rule { height: 1px; background: var(--ink-20); border: 0; margin: 0; }

/* --------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.6rem;
  font-family: var(--body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { background: var(--brick); border-color: var(--brick); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--brick); border-color: var(--brick); color: var(--paper); }

/* --------------------------------------------------------- top bar */
.topbar {
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 30;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  min-height: 40px;
  padding-block: 0.5rem;
  flex-wrap: wrap;
  text-align: center;
}
.topbar a { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(247,245,239,.35); }
.topbar a:hover { border-color: var(--paper); }
.topbar__sep { color: rgba(247,245,239,.35); }
@media (max-width: 660px) {
  .topbar__inner { gap: var(--sp-3); }
  .topbar__inner > span:nth-child(2),
  .topbar__inner > span:nth-child(3),
  .topbar__inner > span:nth-child(4) { display: none; }
}

.status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: #7BAE5E; box-shadow: 0 0 0 0 rgba(123,174,94,.7); animation: pulse 2.4s infinite; }
.status--closed .status__dot { background: #C4553C; animation: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(123,174,94,.65); }
  70%  { box-shadow: 0 0 0 7px rgba(123,174,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(123,174,94,0); }
}

/* --------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(247,245,239,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--ink-20); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  min-height: 78px;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand svg { display: block; }
.brand__mark {
  flex: 0 0 auto;
  display: block;
  width: 30px;
  height: 45px;
  background-color: currentColor;
  -webkit-mask: url('../img/logo-mask.png') no-repeat center / contain;
  mask: url('../img/logo-mask.png') no-repeat center / contain;
}
@media (max-width: 900px) { .brand__mark { width: 26px; height: 39px; } }
.brand__word {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand__sub {
  display: block;
  font-family: var(--body);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-top: 3px;
}

.nav__links { display: flex; align-items: center; gap: var(--sp-8); }
.nav__links a {
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
  position: relative;
  padding-block: 4px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--brick);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.nav__cta { display: flex; align-items: center; gap: var(--sp-4); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: block; }
  .nav { min-height: 64px; }
  .mobile-menu.is-open { display: block; }
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--ink-20);
  background: var(--paper);
  padding: var(--sp-4) 0 var(--sp-8);
}
.mobile-menu a {
  display: block;
  padding: 0.9rem 0;
  text-decoration: none;
  font-family: var(--display);
  font-size: var(--text-2xl);
  border-bottom: 1px solid var(--paper-3);
}
.mobile-menu .btn {
  display: flex;
  margin-top: var(--sp-6);
  width: 100%;
  justify-content: center;
  font-family: var(--body);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--ink);
  padding-block: 1rem;
}

/* --------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--paper-2); padding-block: var(--sp-24) var(--sp-8); }
.site-footer h3 { color: var(--paper); font-size: var(--text-xl); margin-bottom: var(--sp-4); }
.footer__mark {
  display: block;
  width: 34px;
  height: 51px;
  margin-bottom: var(--sp-5, 1.25rem);
  background-color: rgba(247,245,239,.9);
  -webkit-mask: url('../img/logo-mask.png') no-repeat center / contain;
  mask: url('../img/logo-mask.png') no-repeat center / contain;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-16);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__grid p, .footer__grid li { color: rgba(247,245,239,.66); font-size: var(--text-sm); }

/* --------------------------------------------------------- social */
.site-footer .social {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--sp-6);
  list-style: none;
  padding: 0;
}
.social li { display: block; }
.site-footer .social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(247,245,239,.24);
  border-radius: 50%;
  color: rgba(247,245,239,.75);
  transition: color .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.site-footer .social a:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  transform: translateY(-2px);
}
.site-footer .social svg { display: block; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer__grid a { color: rgba(247,245,239,.66); text-decoration: none; transition: color .3s var(--ease); }
.footer__grid a:hover { color: var(--paper); }
.footer__title {
  font-family: var(--body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247,245,239,.4);
  margin-bottom: var(--sp-4);
}
.footer__bottom {
  border-top: 1px solid rgba(247,245,239,.14);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: rgba(247,245,239,.42);
  letter-spacing: 0.06em;
}
