/* Self-hosted fonts (Google Fonts subsets, OFL). The Latin face carries the Latin range only and the
   Tamil face the Tamil range only, so a page downloads just the scripts it shows. */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/dm-sans.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans Tamil'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/noto-sans-tamil.woff2') format('woff2'); unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+25CC; }

/* Inippagam — simple and clean
   Warm white, one terracotta accent, hairline borders, soft corners, real photos. */

:root {
  --bg: #FFFDF9;
  --sand: #F7F2EA;
  --white: #FFFFFF;
  --ink: #1E1B18;
  --ink-2: #4F4A45;
  --muted: #7D766F;
  --border: #E8E1D7;
  --accent: #C8553D;
  --accent-dark: #A8432E;
  --accent-soft: #FBEFEA;
  --logo-coral: #FE5C45;
  --logo-teal: #024148;
  --ok: #E6F3E9;
  --ok-ink: #1F6B3A;
  --err: #FBE4E0;
  --err-ink: #9B2F1F;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(30, 27, 24, .07);
  --gap: clamp(16px, 2.5vw, 32px);
  --font-body: 'DM Sans', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: var(--font-body);
  /* legacy names still used by admin.css */
  --cream: var(--sand);
  --paper: var(--white);
  --red: var(--accent);
  --yellow: #F3D48A;
  --blue: #3B6FB6;
  --line: 1px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 2 * var(--gap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.5em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: 600 1rem var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(200, 85, 61, .35); outline-offset: 2px; }
.btn-red, .btn-ink, .btn-blue, .btn-yellow { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-red:hover, .btn-ink:hover, .btn-blue:hover, .btn-yellow:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-sm { padding: .55em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .count {
  background: rgba(255, 255, 255, .22); color: inherit;
  min-width: 1.6em; height: 1.6em; padding: 0 .45em; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: .8em; margin-left: .1em;
}

/* ---------- header ---------- */
.announcement { background: var(--accent); color: var(--white); font-weight: 500; text-align: center; padding: 8px 0; font-size: .95rem; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 249, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; position: relative; }
/* logo lock-up: coral spiral, Tamil name in deep teal, English name small underneath */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--logo-teal); }
.brand svg { width: 38px; height: 38px; flex: none; color: var(--logo-coral); }
.brand-text { display: flex; flex-direction: column; align-items: flex-end; }
.brand-ta { font-family: 'Noto Sans Tamil', 'DM Sans', system-ui, -apple-system, 'Segoe UI', 'Nirmala UI', sans-serif; font-weight: 700; font-size: 1.45rem; line-height: 1.2; letter-spacing: 0; }
.brand-ta.brand-only { font-family: var(--font-body); font-size: 1.3rem; letter-spacing: -0.01em; }
.brand-en { font-family: var(--font-body); font-weight: 600; font-size: .7rem; line-height: 1; letter-spacing: .02em; text-transform: lowercase; color: var(--logo-coral); margin-top: -2px; }
.brand-stack { flex-direction: column; align-items: flex-start; gap: 8px; }
.brand-stack svg { width: 48px; height: 48px; }
.brand-stack .brand-text { align-items: flex-start; }
.brand-stack .brand-ta { font-size: 1.7rem; }
.brand-stack .brand-en { font-size: .8rem; margin-top: 2px; }
.nav { display: flex; gap: 26px; font-weight: 500; color: var(--ink-2); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; height: 36px; padding: 0 .9em; border: 1px solid var(--border); border-radius: 999px; background: var(--white); font-weight: 600; font-size: .85rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.lang-switch:hover { border-color: var(--ink); }
.nav .lang-switch { display: none; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 999px; background: var(--white);
  place-items: center; gap: 4px; cursor: pointer; padding: 0; grid-auto-rows: 2px; align-content: center;
}
.nav-toggle span:not(.sr-only) { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: calc(var(--gap) * 2); align-items: center; }
.eyebrow { display: inline-block; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); margin: .3em 0 .35em; letter-spacing: -0.025em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.15rem; max-width: 40ch; margin: 0 0 1.8em; color: var(--ink-2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media { border-radius: 24px; overflow: hidden; aspect-ratio: 5 / 4; background: var(--sand); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--sand); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 44ch; }
.section-num { font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section-num i { display: none; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { border: 1px solid var(--border); border-radius: 999px; background: var(--white); padding: .5em 1em; font-weight: 600; cursor: pointer; font-family: var(--font-body); font-size: .9rem; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; gap: 10px; }
.card-cat .star { color: var(--accent); }
.card h3 { font-size: 1.1rem; }
.card-unit { color: var(--muted); font-size: .88rem; }
.card-desc { font-size: .92rem; color: var(--ink-2); margin: 4px 0 0; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.card .btn-sm { background: var(--white); color: var(--accent); border-color: var(--accent); }
.card .btn-sm:hover { background: var(--accent); color: var(--white); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: 999px; background: var(--white); overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--accent); font: 600 1.15rem var(--font-body); cursor: pointer; line-height: 1; }
.stepper button:hover { background: var(--accent-soft); }
.stepper output { min-width: 34px; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-2); background: var(--white); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.step { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; }
.step-num { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 16px; }
.step-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step-body p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* ---------- about ---------- */
.about .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: calc(var(--gap) * 2); align-items: center; }
.about-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-collage .tile { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--sand); display: grid; place-items: center; }
.about-collage .tile img { width: 100%; height: 100%; object-fit: cover; }
.about-collage .tile-empty { border: 1px dashed #DDD3C6; color: #CFC4B4; }
.about-collage .tile-empty svg { width: 34px; height: 34px; }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 16px; letter-spacing: -0.02em; }
.about p { color: var(--ink-2); font-size: 1.05rem; }

/* ---------- contact strip ---------- */
.contact-strip { background: var(--sand); }
.contact-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 56px 0; flex-wrap: wrap; }
.contact-strip h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.02em; }
.contact-strip p { margin: 8px 0 0; color: var(--ink-2); }
.contact-strip .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 56px 0 28px; color: var(--ink-2); }
.site-footer .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--gap); }
.site-footer h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; color: var(--ink); }
.site-footer p { margin: 0; line-height: 1.7; }
.footer-tag { color: var(--muted); margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: var(--muted); }
.footer-bottom span a, .footer-bottom > a { color: inherit; }

/* ---------- cart bar ---------- */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--white); color: var(--ink); border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(30, 27, 24, .08); transform: translateY(110%); transition: transform .2s; }
.cart-bar.is-visible { transform: none; }
.cart-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.cart-bar .sep { color: var(--muted); margin: 0 6px; }
body.has-cart { padding-bottom: 84px; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 28px; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .2em 0 .3em; letter-spacing: -0.02em; }
.page-head p { color: var(--ink-2); max-width: 50ch; font-size: 1.05rem; }
.order-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--gap); align-items: start; padding-bottom: 80px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.panel-head { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.panel-body { padding: 20px; }
.line { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.line:last-of-type { border-bottom: 0; }
.line img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.line-name { font-weight: 600; }
.line-meta { font-size: .85rem; color: var(--muted); }
.line-total { font-weight: 600; min-width: 80px; text-align: right; }
.line-remove { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font-family: var(--font-body); font-size: .85rem; }
.totals { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--border); font-weight: 700; font-size: 1.2rem; }
.note { font-size: .92rem; color: var(--ink-2); border-left: 3px solid var(--accent); padding-left: 12px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .9rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; padding: .7em .9em; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 85, 61, .18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { display: flex; gap: 10px; }
.choice label { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: .65em; text-align: center; cursor: pointer; font-weight: 600; background: var(--white); position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.choice label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(200, 85, 61, .25); }
.alert { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; background: var(--white); margin-bottom: 20px; font-weight: 500; }
.alert-ok { background: var(--ok); border-color: transparent; color: var(--ok-ink); }
.alert-err { background: var(--err); border-color: transparent; color: var(--err-ink); }
.form-actions { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-actions .btn { flex: 1; }

/* ---------- confirmation ---------- */
.confirm { max-width: 780px; margin-inline: auto; padding-bottom: 80px; }
.confirm-mark { width: 72px; height: 72px; background: var(--ok); color: var(--ok-ink); border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px; }
.confirm-mark svg { width: 36px; height: 36px; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.confirm h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.confirm .lede { font-size: 1.1rem; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; padding-bottom: 80px; }
.info-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); padding: 22px 24px; margin-bottom: var(--gap); }
.info-block h3 { font-size: 1.05rem; margin-bottom: 8px; }
.info-block h3 i { display: none; }
.info-block p { margin: 0; line-height: 1.7; color: var(--ink-2); }

/* ---------- credits page ---------- */
.credits { max-width: 760px; margin-inline: auto; padding-bottom: 80px; }
.credits ul { list-style: none; padding: 0; margin: 0; }
.credits li { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .95rem; color: var(--ink-2); }
.credits li img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; }
.credits li b { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .about .wrap, .order-layout, .contact-layout { grid-template-columns: 1fr; }
  .hero-media, .about-collage { max-width: 560px; }
  .steps { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; padding: 18px var(--gap) 22px; gap: 16px; font-size: 1.05rem; }
  .nav.is-open { display: flex; }
  .nav-toggle { display: grid; }
  .field-row { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .line { grid-template-columns: 56px 1fr auto; }
  .line-total { grid-column: 2 / -1; text-align: left; }
  .site-header .wrap { gap: 8px; }
  .header-actions { gap: 8px; }
  /* on phones the language switch lives in the menu drawer; the header has no room for it */
  .header-actions .lang-switch { display: none; }
  .nav .lang-switch { display: inline-flex; align-self: flex-start; margin-top: 4px; }
  .lang-ta .cart-btn { font-size: .85rem; padding: .5em .7em; }
  .brand { gap: 8px; }
  .brand svg { width: 32px; height: 32px; }
  .brand-ta { font-size: 1.2rem; }
  .brand-en { font-size: .62rem; }
  .cart-btn { padding: .5em .9em; }
  .nav-toggle { width: 40px; height: 40px; }
  .hero-media { aspect-ratio: 4 / 3; border-radius: 18px; }
  .contact-strip .wrap { flex-direction: column; align-items: flex-start; }
  .credits li { grid-template-columns: 72px 1fr; }
}

/* ---------- Tamil ---------- */
/* Tamil glyphs come from Noto Sans Tamil through the font stack above. Tamil letters carry marks above and
   below, so give them room and drop the tight tracking. */
.lang-ta { line-height: 1.7; }
.lang-ta h1, .lang-ta h2, .lang-ta h3, .lang-ta h4, .lang-ta .brand { letter-spacing: 0; line-height: 1.3; }
.lang-ta .hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.25; }
.lang-ta .section-num, .lang-ta .eyebrow, .lang-ta .card-cat, .lang-ta .site-footer h4 { letter-spacing: .04em; }
.lang-ta .nav { gap: 22px; }
.lang-ta .card h3 { line-height: 1.4; }
