/* Athangudi Tiles */
:root {
  --terracotta: #b5452c; --teal: #0f6b6b; --lime: #f1e3c6; --soot: #2c2620; --ochre: #d6a03a;
  --bg: #f4ead6; --ink: var(--soot); --muted: #6d6153; --accent: var(--terracotta); --accent-ink: #fff;
  --card: #fbf5e8; --line: rgba(44, 38, 32, .16);
  --font-display: "DM Serif Display", Georgia, serif; --font-body: "Work Sans", system-ui, sans-serif; --font-script: "DM Serif Display", serif;
  --font-label: "Work Sans", system-ui, sans-serif; --font-ta: "Hind Madurai", sans-serif; --radius: 3px;
  --tile-a:
    radial-gradient(circle, var(--soot) 0 6%, var(--lime) 6.5% 17%, transparent 17.5%),
    radial-gradient(circle at 0 0, var(--lime) 0 20%, var(--ochre) 20.5% 25%, transparent 25.5%),
    radial-gradient(circle at 100% 0, var(--lime) 0 20%, var(--ochre) 20.5% 25%, transparent 25.5%),
    radial-gradient(circle at 0 100%, var(--lime) 0 20%, var(--ochre) 20.5% 25%, transparent 25.5%),
    radial-gradient(circle at 100% 100%, var(--lime) 0 20%, var(--ochre) 20.5% 25%, transparent 25.5%),
    conic-gradient(from 45deg, var(--terracotta) 0 25%, var(--teal) 0 50%, var(--terracotta) 0 75%, var(--teal) 0);
  --tile-b:
    radial-gradient(circle, var(--ochre) 0 9%, transparent 9.5%),
    radial-gradient(circle, transparent 0 30%, var(--lime) 30.5% 34%, transparent 34.5%),
    conic-gradient(from 0deg, var(--teal) 0 12.5%, var(--soot) 0 25%, var(--teal) 0 37.5%, var(--soot) 0 50%, var(--teal) 0 62.5%, var(--soot) 0 75%, var(--teal) 0 87.5%, var(--soot) 0);
}
body { font-size: 17px; }
.sec h2 { color: var(--terracotta); }
.sec h2 [lang="ta"] { font-family: var(--font-ta); font-weight: 600; font-size: .66em; }
.eyebrow { color: var(--teal); font-weight: 500; }

/* ---------- intro: tiles flip ---------- */
.at-intro { background: var(--soot); overflow: hidden; perspective: 1200px; transition: opacity .7s ease 1.6s, visibility 0s linear 2.4s; }
.at-floor { position: absolute; inset: -2px; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: calc((100vh + 4px) / 9); gap: 2px; background: var(--soot); }
.at-tile { background: var(--tile-a); background-size: 100% 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.6, 0, .3, 1) var(--d), opacity .5s ease calc(var(--d) + .5s); }
.at-tile.at-b { background: var(--tile-b); background-size: 100% 100%; }
.at-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 14px; transition: opacity .5s, transform .6s; }
.at-plaque { text-align: center; background: var(--lime); border: 8px solid var(--terracotta); outline: 2px solid var(--lime); outline-offset: -14px; padding: 40px clamp(24px, 6vw, 56px); max-width: 440px; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.at-kicker { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--teal); font-weight: 500; }
.at-kicker [lang="ta"] { font-size: 14px; letter-spacing: 0; }
.at-title { font-family: var(--font-display); font-size: clamp(40px, 9vw, 60px); line-height: 1.05; margin: 10px 0; color: var(--soot); }
.at-title [lang="ta"] { font-family: var(--font-ta); font-weight: 600; font-size: .55em; line-height: 1.5; }
.at-names { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--terracotta); margin-bottom: 22px; }
.at-cta { background: var(--teal); color: #fff; }
.at-lang { background: var(--soot); color: var(--lime); border: 1px solid rgba(241,227,198,.4); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
html.intro-opening .at-cover { opacity: 0; transform: scale(.95); }
html.intro-opening .at-tile { transform: rotateY(180deg) scale(.6); opacity: 0; }
html.intro-opening .at-intro { opacity: 0; visibility: hidden; }

/* ---------- hero ---------- */
.at-strip { height: 64px; background: var(--tile-a); background-size: 64px 64px; border-block: 4px solid var(--soot); }
.at-strip:nth-of-type(even) { background: var(--tile-b); background-size: 64px 64px; }
.at-court { display: grid; grid-template-columns: 70px 1fr 70px; min-height: calc(100svh - 144px); background: var(--bg); }
.at-pillar { position: relative; margin: 0 14px; background: linear-gradient(90deg, #2a1a10, #5a3a24 30%, #3b2516 60%, #20130b); }
.at-pillar::before, .at-pillar::after { content: ""; position: absolute; left: -10px; right: -10px; height: 26px; background: linear-gradient(#6b4a2e, #2a1a10); border-radius: 3px; }
.at-pillar::before { top: 0; } .at-pillar::after { bottom: 0; }
.at-hero-body { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 8px; }
.at-icon { width: 54px; height: 54px; background: var(--tile-a); background-size: 100% 100%; transform: rotate(45deg); margin-bottom: 26px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--soot); }
.at-lead { color: var(--muted); max-width: 460px; margin: 12px auto 30px; }
.at-hero .name { font-size: clamp(52px, 12vw, 104px); color: var(--soot); }
.at-hero .name [lang="ta"] { font-family: var(--font-ta); font-weight: 600; font-size: .5em; line-height: 1.7; display: inline-block; }
.at-hero .weds { font-family: var(--font-display); font-style: italic; color: var(--terracotta); font-size: 28px; margin: 6px 0; }
.at-hero .weds [lang="ta"] { font-style: normal; font-size: 17px; font-family: var(--font-ta); }
.at-date { margin-top: 30px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--teal); border-top: 2px solid var(--soot); border-bottom: 2px solid var(--soot); padding: 10px 6px; }
.at-date [lang="ta"] { letter-spacing: .02em; }
@media (max-width: 640px) { .at-court { grid-template-columns: 1fr; } .at-pillar { display: none; } }

/* ---------- sections ---------- */
.at-band .sec-head h2::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 14px; background: var(--tile-b); background-size: 100% 100%; transform: rotate(45deg); }
.at-teal { background: var(--teal); color: var(--lime); --ink: var(--lime); --muted: rgba(241,227,198,.75); --line: rgba(241,227,198,.25); --accent: var(--ochre); --card: rgba(0,0,0,.14); }
.at-teal .sec h2 { color: var(--lime); }
.at-teal .eyebrow { color: var(--lime); }
.at-teal { --accent-ink: var(--soot); }
.foot { --accent: var(--ochre); }
.scratch { --foil-1: #8d3520; --foil-2: #e07a5c; --foil-3: #6b2716; --foil-label: "Scratch the tile"; --burst: #b5452c, #0f6b6b, #d6a03a, #f1e3c6; background: var(--card); border: 6px solid var(--soot); border-radius: 0; }
.event { background: var(--card); border: 1px solid var(--line); padding: 20px; border-top: 8px solid transparent; border-image: var(--tile-a) 8 / 8px 0 0 0 / 0 round; }
.at-teal .event { background: rgba(0,0,0,.14); }
.event-date b { color: var(--accent); }
.cd-cell { background: var(--tile-a); background-size: 100% 100%; position: relative; border-radius: 0; }
.cd-cell::before { content: ""; position: absolute; inset: 10px; background: var(--lime); }
.cd-cell b, .cd-cell small { position: relative; color: var(--soot); }
.venue, .note { background: var(--card); border: 6px solid var(--lime); outline: 2px solid var(--soot); outline-offset: -2px; padding: clamp(26px, 6vw, 46px) 20px; }
.signature { font-family: var(--font-display); font-style: italic; color: var(--terracotta); }
.btn { border-radius: 0; }
.foot { background: var(--soot); color: var(--lime); --muted: rgba(241,227,198,.7); }
.foot-names { color: var(--lime); }
@media (max-width: 560px) {
  .event { grid-template-columns: 1fr; text-align: center; }
  .event-date { display: flex; gap: 10px; justify-content: center; align-items: baseline; }
}
