/* Maria Coffee online menu — plain CSS, no build step. */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --green: #00704A;        /* Starbucks green */
  --green-dark: #1E3932;   /* deep house green */
  --green-soft: #D4E9E2;   /* light tint for placeholders and chips */
  --white: #FFFFFF;
  --ink: #1B2A24;
  --muted: #5E6E66;
  --line: #E2EBE6;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  background: var(--white);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: calc(30px + env(safe-area-inset-top, 0px)) 20px 34px;
  background: linear-gradient(120deg, var(--green-dark), var(--green), #1c8a62, var(--green-dark));
  background-size: 300% 300%;
  animation: drift 16s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-inner { position: relative; z-index: 1; }

.logo {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 6px rgba(255,255,255,.15);
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: pop .7s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo .cup { display: none; width: 56px; height: 56px; }
.logo.nologo .cup { display: block; }

.steam { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 18; stroke-dashoffset: 18; opacity: 0; animation: steam 2.6s ease-in-out infinite; }
.steam.s2 { animation-delay: .5s; }
.steam.s3 { animation-delay: 1s; }
@keyframes steam {
  0%   { stroke-dashoffset: 18; opacity: 0; }
  30%  { opacity: .9; }
  100% { stroke-dashoffset: -18; opacity: 0; }
}

.hero h1 { font-size: 30px; font-weight: 800; line-height: 1.2; }
.hero p  { margin-top: 4px; font-size: 15px; opacity: .88; }

/* Floating beans (decoration) */
.bean {
  position: absolute;
  bottom: -30px;
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,.2);
  --crease: #0b5a3c;
  animation: rise var(--t, 9s) linear var(--d, 0s) infinite;
  pointer-events: none;
}
.bean path { stroke: var(--crease, #fff); }
@keyframes rise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(var(--h, -240px)) rotate(200deg); opacity: 0; }
}

/* ---------- Sticky search + categories ---------- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px;
}
.bar { display: flex; align-items: center; gap: 10px; }
.search {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* 16px stops iPhones from zooming in */
  padding: 12px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #F4F8F6;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search::placeholder { color: var(--muted); }
.search:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,112,74,.18); background: #fff; }

.chips {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.chip:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.view {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.view svg { width: 24px; height: 24px; }
.view .i-grid { display: none; }
body.big .view .i-grid { display: block; }
body.big .view .i-one { display: none; }
.view:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* ---------- Menu ---------- */
main { max-width: 960px; margin: 0 auto; padding: 4px 14px 24px; }
.section { padding-top: 22px; scroll-margin-top: 150px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}
.section-head h2 { font-size: 22px; font-weight: 800; color: var(--green-dark); }
.section-head .count { font-size: 14px; color: var(--muted); }

/* Cards: picture on top, name and price underneath.
   Phones: 2 per row (about 170px pictures). Big view: 1 per row, full width. */
.list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
}
.item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(30,57,50,.07);
}

/* Picture slot (square). Shows a soft green cup until a real photo is added. */
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--green-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M14 26h36v14a14 14 0 0 1-14 14h-8a14 14 0 0 1-14-14z' fill='%2300704A' fill-opacity='.35'/%3E%3Cpath d='M50 30h4a6 6 0 0 1 0 12h-5' fill='none' stroke='%2300704A' stroke-opacity='.35' stroke-width='3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 38%;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 6px; padding: 10px 12px 12px; }
.info { min-width: 0; }
.fa { font-size: 15.5px; font-weight: 700; line-height: 1.55; }
.en { font-size: 12px; color: var(--muted); direction: ltr; text-align: right; line-height: 1.4; margin-top: 2px; }

.price { margin-top: auto; padding-top: 4px; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
.price .amt { font-size: 17px; font-weight: 800; color: var(--green); white-space: nowrap; }
.price .none { color: var(--muted); font-weight: 400; }
.price .tier { display: block; font-size: 15px; font-weight: 800; color: var(--green); white-space: nowrap; line-height: 1.5; }
.price .tier small { font-size: 11px; font-weight: 400; color: var(--muted); margin-right: 4px; }

/* Group card (Espresso, Americano...): one picture, a button that opens a table of models */
.item { scroll-margin-top: 150px; }
.meta { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 1px 10px; }
.price small { font-size: 11px; font-weight: 400; color: var(--muted); margin-right: 4px; }
.more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 46px; margin-top: 8px;
  border: 1.5px solid var(--green); border-radius: 999px;
  background: #fff; color: var(--green);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, color .2s;
}
.more svg { width: 18px; height: 18px; transition: transform .25s; }
.more[aria-expanded="true"] { background: var(--green); color: #fff; }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }
.more:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.item.group.open { grid-column: 1 / -1; }
.item.group.open .thumb { aspect-ratio: 4 / 3; }
.panel { margin-top: 10px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.types { width: 100%; border-collapse: collapse; }
.types th.sub {
  text-align: right; font-size: 14px; font-weight: 700; color: var(--green-dark);
  background: var(--green-soft); padding: 8px 12px;
}
.types tr.grp:first-child th { border-radius: 10px 10px 0 0; }
.types td { padding: 11px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.types tr:last-child td { border-bottom: none; }
.types .nm { text-align: right; }
.types .nm .fa { font-size: 15.5px; font-weight: 600; }
.types .pr { width: 1%; white-space: nowrap; padding-left: 8px; }
.types .price { text-align: left; padding-top: 0; }
.types .price .amt { font-size: 16px; }

/* Big view: one wide card per row */
body.big .list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
body.big .thumb { aspect-ratio: 4 / 3; }
body.big .body { padding: 14px 16px 16px; gap: 8px; }
body.big .fa { font-size: 18px; }
body.big .en { font-size: 13px; }
body.big .price .amt { font-size: 20px; }
body.big .price .tier { font-size: 17px; }

/* Tablets and desktops: more cards per row */
@media (min-width: 700px) {
  .list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  body.big .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Very small phones */
@media (max-width: 340px) {
  .list { gap: 8px; }
  .body { padding: 8px 9px 10px; }
  .fa { font-size: 14px; }
}

.empty { display: none; text-align: center; color: var(--muted); padding: 48px 16px; }
.empty.show { display: block; }

/* ---------- Animated band above the footer ---------- */
.waves { position: relative; height: 96px; overflow: hidden; margin-top: 16px; }
.wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background-repeat: repeat-x;
  background-size: 600px 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30C200 0 400 0 600 30S1000 60 1200 30V60H0z' fill='%2300704A'/%3E%3C/svg%3E");
}
.wave.w1 { opacity: .25; height: 70px; animation: slide 18s linear infinite reverse; }
.wave.w2 { opacity: .55; animation: slide 11s linear infinite; }
@keyframes slide { from { background-position-x: 0; } to { background-position-x: 600px; } }
.waves .bean { color: var(--green-dark); --crease: #fff; --h: -70px; bottom: 10px; opacity: 0; }

/* ---------- Footer ---------- */
footer {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 8px 16px calc(26px + env(safe-area-inset-bottom, 0px));
}
.ig {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 20px 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  direction: ltr;
  transition: background .2s;
}
.ig:hover { background: rgba(255,255,255,.24); }
.ig:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ig svg { width: 26px; height: 26px; flex: none; }
.powered { margin-top: 14px; font-size: 12px; opacity: .7; direction: ltr; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .logo, .steam, .bean, .wave { animation: none !important; }
  .steam { opacity: .8; stroke-dashoffset: 0; }
  .bean { opacity: .8; }
}
