/* ==========================================================
   Berry Cafe — styles
   The colors and fonts below set the whole look.
   Change a value here and it updates everywhere on the site.
   ========================================================== */

:root {
  /* Brand colors, taken straight from the Berry Coffee logo */
  --teal:        #208985;  /* logo background */
  --cream:       #F9ECD9;  /* logo line art */

  /* Supporting colors, taken from the cafe itself */
  --teal-deep:   #155E5B;  /* headings and links on light backgrounds */
  --teal-dark:   #0F4644;  /* footer */
  --teal-button: #176A66;  /* secondary button on the teal banner */
  --wall:        #3E5A60;  /* the dusty teal walls inside the cafe */
  --paper:       #FDF7EE;  /* page background */
  --espresso:    #2B211C;  /* main text */
  --espresso-soft: #6B5646;
  --leather:     #88593F;  /* the brown aprons */

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Fraunces", Georgia, serif;
  --font-ui:      "Quicksand", "Segoe UI", sans-serif;
  --font-script:  "Yellowtail", "Brush Script MT", cursive;
  --font-arabic:  "Aref Ruqaa", "Noto Naskh Arabic", serif;     /* Arabic lettering accents */
  --font-arabic-text: "Noto Naskh Arabic", "Segoe UI", serif;   /* everyday Arabic text */

  --header-h: 72px;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
  font-variation-settings: "SOFT" 50;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft film grain over everything, for the vintage feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.08;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .13 0 0 0 0 .11 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  line-height: 1.12;
}

a { color: var(--teal-deep); }

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

section[id] { scroll-margin-top: var(--header-h); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(253, 247, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 3px double rgba(21, 94, 91, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--teal-deep);
}

.brand img { width: auto; height: 42px; }

.brand span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 650;
  font-size: 1.55rem;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-inline-start: auto;
}

.site-header nav a {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--espresso);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-header nav a:hover {
  color: var(--teal-deep);
  border-bottom-color: currentColor;
}

/* language button (English ⇄ عربي) */
.lang-switch {
  padding: 0.2rem 0.9rem;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  color: var(--teal-deep);
  border: 1.5px solid var(--teal-deep);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.lang-switch:hover { background: var(--teal-deep); color: var(--cream); }
.lang-switch[lang="ar"] { font-family: var(--font-arabic-text); font-size: 1rem; }
.lang-switch[lang="en"] { font-family: "Quicksand", sans-serif; font-size: 0.9rem; letter-spacing: 0.04em; }

@media (max-width: 560px) {
  .brand { order: 1; }
  .lang-switch { order: 2; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; }
  .site-header nav a { font-size: 0.75rem; letter-spacing: 0.1em; }
  .brand img { height: 34px; }
  .brand span { font-size: 1.3rem; }
  :root { --header-h: 100px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.45);
}

.btn svg {
  width: 1.25em;
  height: 1.25em;
  margin-inline-end: 0.55em;
  vertical-align: -0.25em;
}

.btn--cream { background: var(--cream); color: var(--teal-deep); }
.btn--teal  { background: var(--teal-deep); color: var(--cream); }

.btn--ghost {
  background: var(--teal-button);
  color: var(--cream);
  border-color: rgba(249, 236, 217, 0.75);
}

/* ---------- Welcome banner ---------- */

.hero {
  position: relative;
  background: var(--teal);
  color: var(--cream);
  padding: clamp(3rem, 7vw, 5rem) 1rem clamp(3.5rem, 8vw, 5.5rem);
}

/* thin double frame, like an old shop sign */
.hero::before {
  content: "";
  position: absolute;
  inset: clamp(10px, 2vw, 22px);
  border: 1px solid rgba(249, 236, 217, 0.45);
  outline: 1px solid rgba(249, 236, 217, 0.25);
  outline-offset: 5px;
  pointer-events: none;
}

/* scalloped edge, like a cafe awning */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: radial-gradient(circle at 14px 0, var(--teal) 13.5px, transparent 14px) 0 0 / 28px 14px repeat-x;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  max-width: 1160px;
  margin: 0 auto;
}

.hero-center { text-align: center; }

.hero-est {
  margin: 0 0 0.25rem;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.hero-logo img {
  width: clamp(250px, 40vw, 420px);
  margin: 0 auto;
}

.hero-tagline {
  margin: 1.25rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 5.5vw, 3.1rem);
  line-height: 1.1;
}

.hero-arabic {
  margin: 0.35rem 0 1.75rem;
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.4;
  opacity: 0.9;
}

/* "Berry Cafe" under the tagline on the Arabic page */
.hero-latin {
  margin: 0.35rem 0 1.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.4;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.hero-photo { display: none; }

@media (min-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr auto 1fr; gap: 2rem; }
  .hero-photo { display: block; width: 250px; }
  .hero-photo--left  { transform: rotate(-6deg) translateY(1.5rem); justify-self: end; }
  .hero-photo--right { transform: rotate(5deg) translateY(-1rem); justify-self: start; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(4.5rem, 9vw, 7rem) 0; }

.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }

.section--wall {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    var(--wall);
  color: var(--cream);
  overflow: hidden;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}

.kicker {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--leather);
}

.section h2 {
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  font-weight: 600;
  color: var(--teal-deep);
}

.section-head--light .kicker,
.section-head--light h2 { color: var(--cream); }

/* laurel divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.1rem 0 1.4rem;
  color: var(--leather);
}

.section-head--light .ornament { color: rgba(249, 236, 217, 0.8); }

.ornament svg { width: 58px; height: 15px; }
.ornament svg.flip { transform: scaleX(-1); }

.ornament span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ornament--left { justify-content: flex-start; }

/* ---------- Picture frames ---------- */

.frame {
  position: relative;
  margin: 0;
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.6);
}

.frame img { width: 100%; }

.frame--wood {
  padding: 12px;
  background: linear-gradient(135deg, #7a5134 0%, #a57550 22%, #6b4429 48%, #9b6c47 72%, #5e3b24 100%);
  box-shadow:
    0 16px 32px -14px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 0 0 5px rgba(0, 0, 0, 0.14);
}

.frame--wood img { border: 8px solid #F1E4CC; }

.frame--gold {
  padding: 9px;
  background: linear-gradient(135deg, #e8cf8f 0%, #a9803f 28%, #f1dba2 52%, #8c6630 78%, #d9b870 100%);
}

.frame--gold img { border: 6px solid #EFE3CC; }

.frame--polaroid {
  padding: 10px 10px 44px;
  background: #FBF7EF;
}

.frame--polaroid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--espresso-soft);
}

/* ---------- Our story ---------- */

.story {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.story-photo { margin: 0; max-width: 480px; justify-self: center; }
.story-photo .frame { transform: rotate(-2deg); }

.story-photo figcaption {
  margin-top: 1.1rem;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--teal-deep);
}

.story-text p { max-width: 36em; }

.lead {
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--teal-deep);
}

@media (min-width: 860px) {
  .story { grid-template-columns: 5fr 6fr; }
}

/* ---------- Menu ---------- */

.menu-note {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--espresso-soft);
}

.pop { color: var(--leather); }

.menu-tabs { display: none; }

.js .menu-tabs {
  display: flex;
  gap: 0.55rem;
  max-width: 920px;
  margin: 0 auto 1.75rem;
  padding: 0.3rem 1rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}

.menu-tabs::-webkit-scrollbar { display: none; }

@media (min-width: 900px) {
  .js .menu-tabs {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

.menu-tab {
  flex: none;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-deep);
  background: transparent;
  border: 1.5px solid var(--teal-deep);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.menu-tab:hover { background: rgba(21, 94, 91, 0.1); }

.menu-tab[aria-selected="true"] {
  background: var(--teal-deep);
  color: var(--cream);
}

.menu-card {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 3.5rem);
  background: var(--paper);
  border: 1px solid rgba(21, 94, 91, 0.5);
  outline: 1px solid rgba(21, 94, 91, 0.5);
  outline-offset: -8px;
  box-shadow: 0 20px 40px -24px rgba(43, 33, 28, 0.5);
}

.menu-panel + .menu-panel { margin-top: 3rem; }
.js .menu-panel + .menu-panel { margin-top: 0; }

.menu-panel h3 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  color: var(--teal-deep);
}

.menu-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 420px;
}

.menu-list--two { max-width: none; }

@media (min-width: 720px) {
  .menu-list--two { columns: 2; column-gap: 3.5rem; }
}

.menu-list li {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(1.5rem, 1fr) auto;
  align-items: baseline;
  align-items: last baseline;
  column-gap: 0.5rem;
  padding: 0.45rem 0;
  break-inside: avoid;
}

.menu-list .item { font-size: 1.1rem; font-weight: 500; line-height: 1.35; }

.menu-list .note {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: var(--espresso-soft);
}

.menu-list .dots {
  border-bottom: 2px dotted rgba(43, 33, 28, 0.3);
  transform: translateY(-0.3em);
}

.menu-list .price {
  font-family: var(--font-ui);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--teal-deep);
}

/* ---------- Gallery wall ---------- */

.gallery-wall {
  columns: 2;
  column-gap: 1.1rem;
}

.gallery-wall .frame {
  break-inside: avoid;
  margin-bottom: 1.4rem;
  transition: transform 0.35s ease;
}

.gallery-wall .frame:nth-child(3n+1) { transform: rotate(-1.6deg); }
.gallery-wall .frame:nth-child(3n+2) { transform: rotate(1.2deg); }
.gallery-wall .frame:nth-child(3n)   { transform: rotate(-0.5deg); }
.gallery-wall .frame:hover { transform: rotate(0) scale(1.02); }

@media (max-width: 599px) {
  .frame--wood { padding: 7px; }
  .frame--wood img { border-width: 4px; }
  .frame--gold { padding: 6px; }
  .frame--gold img { border-width: 3px; }
  .frame--polaroid { padding: 6px 6px 34px; }
  .frame--polaroid figcaption { font-size: 1.1rem; bottom: 4px; }
}

@media (min-width: 900px) {
  .gallery-wall { columns: 3; column-gap: 2.25rem; }
  .gallery-wall .frame { margin-bottom: 2.5rem; }
}

/* ---------- Visit ---------- */

/* opening hours, styled like a shop sign */
.open-sign {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(2.5rem, 5vw, 3.25rem);
  padding: 1.1rem 2.5rem 1.3rem;
  text-align: center;
  color: var(--cream);
  background: var(--teal-button);
  border-radius: 14px;
  outline: 1.5px solid rgba(249, 236, 217, 0.6);
  outline-offset: -8px;
  box-shadow: 0 14px 28px -16px rgba(15, 70, 68, 0.8);
}

.open-sign p { margin: 0; }

.open-sign-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.open-sign-hours {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  line-height: 1.3;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.branch-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  background: var(--cream);
  border: 1px solid rgba(21, 94, 91, 0.25);
  border-radius: 4px;
}

.branch-card h3 {
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--teal-deep);
}

.branch-card p { margin: 0; }
.branch-card p:last-of-type { margin-bottom: 1.1rem; }

.branch-ar {
  font-family: var(--font-arabic-text);
  color: var(--espresso-soft);
}

.branch-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal-deep);
  text-decoration: none;
  border: 1.5px solid var(--teal-deep);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.branch-phone:hover { background: var(--teal-deep); color: var(--cream); }
.branch-phone svg { width: 1.1em; height: 1.1em; }

.social-link {
  margin: 2.75rem 0 0;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3.5rem 1rem 2.5rem;
  text-align: center;
  background: var(--teal-dark);
  color: var(--cream);
}

.site-footer img {
  width: auto;
  height: 70px;
  margin: 0 auto;
}

.footer-tagline {
  margin: 0.75rem 0 1.25rem;
  font-family: var(--font-script);
  font-size: 1.8rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
}

.site-footer nav a {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
}

.site-footer nav a:hover { text-decoration: underline; }

.footer-copy {
  margin: 1.75rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-copy span:lang(ar) { font-family: var(--font-arabic); font-size: 1.05rem; }

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
}

.footer-social:hover { text-decoration: underline; }
.footer-social svg { width: 1.3em; height: 1.3em; }

/* ---------- Arabic version (ar/index.html) ---------- */

html[lang="ar"] {
  --font-display: "El Messiri", "Noto Naskh Arabic", serif;
  --font-body:    var(--font-arabic-text);
  --font-ui:      "El Messiri", "Noto Naskh Arabic", sans-serif;
  --font-script:  var(--font-arabic);
}

html[lang="ar"] body { line-height: 1.9; }
html[lang="ar"] :is(h1, h2, h3) { line-height: 1.4; }

/* Arabic letters join together, so no letter spacing, capitals or slanted text */
html[lang="ar"] :is(.kicker, .btn, .menu-tab, .open-sign-label, .site-header nav a, .site-footer nav a) {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ar"] :is(.brand span, .hero-est, .lead, .menu-panel h3, .menu-list .note) { font-style: normal; }

html[lang="ar"] .kicker { font-size: 1rem; }
html[lang="ar"] .btn { font-size: 1.05rem; }
html[lang="ar"] :is(.site-header nav a, .site-footer nav a) { font-size: 1rem; font-weight: 600; }
html[lang="ar"] .brand span { font-family: var(--font-arabic); font-weight: 700; font-size: 1.6rem; }
html[lang="ar"] .hero-est { font-size: 1.35rem; }
html[lang="ar"] .hero-tagline { font-weight: 700; line-height: 1.5; }
html[lang="ar"] :is(.story-photo figcaption, .frame--polaroid figcaption, .footer-tagline) { font-weight: 700; }

/* point the laurel sprigs outwards when reading right to left */
[dir="rtl"] .ornament svg { transform: scaleX(-1); }
[dir="rtl"] .ornament svg.flip { transform: none; }

@media (max-width: 560px) {
  html[lang="ar"] .site-header nav a { font-size: 0.95rem; }
}

/* ---------- Respect "reduce motion" settings ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
