/*
Theme Name: CEL Coffee
Theme URI: https://cel.coffee/
Author: The Coffee Excellence Lab
Author URI: https://cel.coffee/
Description: One-page theme for The Coffee Excellence Lab (CEL), Bhubaneswar. Value-chain story, offerings, a step-by-step course booking form that saves requests in the dashboard and emails them, and contact details editable in the Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cel-coffee
*/

/* Base reset */
body { margin: 0; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Layout: a lab notebook for the coffee chain. Sticky header, statement hero,
   a four-stage value-chain strip (seed to cup), offerings, a stepwise booking form, contact. */
:root {
  --bg: #F2F4EF;
  --surface: #FFFFFF;
  --ink: #17211C;
  --muted: #56645C;
  --line: #D3DAD2;
  --leaf: #2C5A43;
  --leaf-soft: #E1EBE4;
  --cherry: #B0243A;
  --cherry-soft: #F6E2E5;
  --on-accent: #FFFFFF;
  --focus: #B0243A;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1512; --surface: #161E1A; --ink: #E6ECE7; --muted: #9AA9A0;
    --line: #2A3630; --leaf: #86BC9E; --leaf-soft: #1C2B23;
    --cherry: #E8667A; --cherry-soft: #3A1C22; --on-accent: #0F1512; --focus: #E8667A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1512; --surface: #161E1A; --ink: #E6ECE7; --muted: #9AA9A0;
  --line: #2A3630; --leaf: #86BC9E; --leaf-soft: #1C2B23;
  --cherry: #E8667A; --cherry-soft: #3A1C22; --on-accent: #0F1512; --focus: #E8667A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cherry);
}
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: var(--step-3); font-weight: 700; }
.section-head p { color: var(--muted); font-size: var(--step-1); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--leaf); color: var(--bg);
  font-family: var(--f-display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em;
}
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; align-items: center; }
nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); }
nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 0.95rem/1 var(--f-body); padding: 0.85rem 1.3rem; border-radius: 999px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--cherry); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
nav .btn { color: var(--on-accent); padding: 0.65rem 1.05rem; }
@media (max-width: 760px) { nav li:not(:last-child) { display: none; } }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { font-size: var(--step-4); font-weight: 800; max-width: 15ch; }
.hero h1 .r { color: var(--cherry); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.hero-copy { display: grid; gap: 1.25rem; }
.hero-copy p { font-size: var(--step-1); color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Value chain strip */
.chain {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  margin-top: clamp(2.5rem, 6vw, 4rem); overflow: hidden;
}
.stage { padding: 1.4rem 1.3rem 1.5rem; display: grid; gap: 0.55rem; align-content: start; position: relative; min-width: 0; }
.stage + .stage { border-left: 1px solid var(--line); }
.stage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.stage-no { font-family: var(--f-mono); font-size: var(--step--1); color: var(--muted); }
.stage-where { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--leaf); }
.stage h3 { font-size: var(--step-2); font-weight: 700; }
.stage h3 span { color: var(--cherry); }
.stage p { color: var(--muted); font-size: 0.95rem; }
.readout {
  margin-top: 0.4rem; font-family: var(--f-mono); font-size: 0.78rem;
  padding: 0.45rem 0.6rem; border-radius: 6px; background: var(--leaf-soft); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.readout b { color: var(--leaf); font-weight: 500; }
.chain-foot {
  grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 0.9rem 1.3rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  font-family: var(--f-mono); font-size: var(--step--1); color: var(--muted);
}
.chain-foot strong { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) {
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage:nth-child(3) { border-left: 0; }
  .stage:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .chain { grid-template-columns: 1fr; }
  .stage + .stage { border-left: 0; border-top: 1px solid var(--line); }
}

/* About / work areas */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-grid .lead { font-family: var(--f-display); font-size: var(--step-2); font-weight: 500; line-height: 1.3; }
.about-grid .lead em { font-style: normal; color: var(--leaf); }
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.areas li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.3rem; min-width: 0; }
.areas li:nth-child(odd) { padding-right: 1.25rem; }
.areas li:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.areas strong { font-family: var(--f-display); font-size: var(--step-1); font-weight: 700; }
.areas span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .areas { grid-template-columns: 1fr; }
  .areas li:nth-child(n) { padding-inline: 0; border-left: 0; }
}

/* Offerings */
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.offer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0;
}
.offer-head { display: grid; gap: 0.35rem; }
.offer-code { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.offer h3 { font-size: var(--step-2); font-weight: 700; }
.offer > p { color: var(--muted); font-size: 0.95rem; }
.offer ul { list-style: none; margin: 0; padding: 0; display: grid; }
.offer li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.7rem 0; border-top: 1px dashed var(--line); font-weight: 500; }
.offer li:last-child { border-bottom: 1px dashed var(--line); }
.offer li::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--cherry); transform: translateY(-0.1rem); }
.offer .more { margin-top: auto; font-weight: 600; color: var(--leaf); text-decoration: none; font-size: 0.95rem; }
.offer .more:hover { text-decoration: underline; }
.offer.featured { background: var(--leaf); border-color: var(--leaf); color: var(--bg); }
.offer.featured .offer-code, .offer.featured > p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.offer.featured li { border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.offer.featured li::before { background: var(--bg); }
.offer.featured .more { color: var(--bg); }
@media (max-width: 900px) { .offer-grid { grid-template-columns: 1fr; } }

/* Booking */
.book-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.book-aside { display: grid; gap: 1.25rem; position: sticky; top: 6rem; }
.book-aside h2 { font-size: var(--step-3); font-weight: 700; }
.book-aside p { color: var(--muted); }
.catalog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.catalog h4 { margin: 0; padding: 0.7rem 1rem; font-family: var(--f-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.catalog dl { margin: 0; display: grid; }
.catalog div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.catalog div:last-child { border-bottom: 0; }
.catalog dt { font-weight: 600; }
.catalog dd { margin: 0; color: var(--muted); font-family: var(--f-mono); font-size: 0.78rem; text-align: right; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } .book-aside { position: static; } }

form.booking {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.6rem;
}
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.7rem; min-width: 0; }
legend, .label { font-weight: 600; font-size: 0.95rem; padding: 0; margin-bottom: 0.1rem; display: flex; gap: 0.6rem; align-items: baseline; }
.step-tag { font-family: var(--f-mono); font-weight: 400; font-size: 0.72rem; color: var(--cherry); letter-spacing: 0.06em; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; flex-direction: column; gap: 0.1rem;
  padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 8px;
  font-weight: 500; font-size: 0.95rem; cursor: pointer; background: var(--bg);
  transition: border-color .15s ease, background-color .15s ease;
}
.choice span small { font-family: var(--f-mono); font-size: 0.7rem; color: var(--muted); font-weight: 400; }
.choice:hover span { border-color: var(--muted); }
.choice input:checked + span { border-color: var(--leaf); background: var(--leaf-soft); box-shadow: inset 0 0 0 1px var(--leaf); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.info-card {
  padding: 1rem 1.1rem; border-radius: 8px; background: var(--leaf-soft); border: 1px solid var(--leaf);
  display: grid; gap: 0.25rem;
}
.info-card strong { font-family: var(--f-display); font-size: var(--step-1); }
.info-card span { color: var(--muted); font-size: 0.92rem; }
.selection {
  font-family: var(--f-mono); font-size: 0.8rem; padding: 0.65rem 0.8rem; border-radius: 6px;
  border: 1px dashed var(--line); color: var(--muted); overflow-wrap: anywhere;
}
.selection b { color: var(--ink); font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field label i { font-style: normal; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.85rem;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--cherry); }
.err { color: var(--cherry); font-size: 0.82rem; min-height: 0; }
.err:empty { display: none; }
.form-err { color: var(--cherry); font-size: 0.9rem; }
.form-err:empty { display: none; }
.submit-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.submit-row p { color: var(--muted); font-size: 0.85rem; max-width: 26rem; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

.thanks {
  background: var(--surface); border: 1px solid var(--leaf); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; gap: 1rem; justify-items: start;
}
.thanks .tick { width: 3rem; height: 3rem; border-radius: 50%; background: var(--leaf); color: var(--bg); display: grid; place-items: center; }
.thanks h3 { font-size: var(--step-2); }
.thanks p { color: var(--muted); }
.thanks .selection { width: 100%; }

/* Contact */
.contact { background: var(--leaf); color: var(--bg); border-top: 0 !important; }
.contact .eyebrow { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact h2 { font-size: var(--step-3); font-weight: 700; }
.contact address { font-style: normal; font-size: var(--step-1); line-height: 1.5; margin-top: 1.25rem; }
.contact address a { display: inline-block; margin-top: 0.75rem; font-size: 0.95rem; font-weight: 600; }
.lines { display: grid; gap: 0.75rem; }
.line {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.1rem; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--bg) 28%, transparent); min-width: 0;
}
.line div { display: grid; gap: 0.15rem; min-width: 0; }
.line small { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.line a { font-family: var(--f-display); font-size: var(--step-1); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; user-select: all; }
.line a:hover { text-decoration: underline; }
.copy {
  flex: none; font: 500 0.8rem/1 var(--f-body); padding: 0.55rem 0.8rem; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--bg); border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent);
}
.copy:hover { border-color: var(--bg); }
.contact :focus-visible { outline-color: var(--bg); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

footer { padding-block: 1.5rem; font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }

/* WordPress admin bar offset */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Generic pages and posts (index.php) */
.entry { padding-block: clamp(3rem, 7vw, 5rem); }
.entry + .entry { border-top: 1px solid var(--line); }
.entry-title { font-size: var(--step-3); font-weight: 700; margin-bottom: 1.25rem; }
.entry-title a { text-decoration: none; }
.entry-meta { font-family: var(--f-mono); font-size: var(--step--1); color: var(--muted); margin-bottom: 1rem; }
.entry-content { max-width: 44rem; }
.entry-content > * + * { margin-top: 1em; }
.entry-content a { color: var(--leaf); }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.pagination { padding-block: 2rem; display: flex; gap: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
