/* selfphotostudio.sg — single stylesheet. Warm studio palette:
   porcelain bg / charcoal ink / terracotta accent / blush surfaces. */

:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --blush: #f5e9e0;
  --blush-deep: #eeD9cc;
  --ink: #241f1b;
  --muted: #6f6259;
  --line: #e7dcd2;
  --accent: #c2553f;
  --accent-dark: #a3402c;
  --accent-soft: #fbe9e4;
  --ok: #3e7d54;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(36, 31, 27, .07);
  --shadow-lg: 0 10px 34px rgba(36, 31, 27, .12);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* footer always reaches the bottom of the viewport on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.22; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: grid; place-items: center; }
.brand-text em { font-style: normal; color: var(--accent); }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 8px 13px; border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: .95rem;
}
.nav-list a:hover { background: var(--blush); text-decoration: none; }
.nav-list a.active { background: var(--ink); color: #fff; }
.nav-toggle, .nav-toggle-box { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px;
  }
  .nav-toggle span { width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; }
  .nav-list {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px;
  }
  .nav-toggle-box:checked ~ .nav-list { display: flex; }
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero p.lead { font-size: 1.13rem; color: var(--muted); }
.hero-art img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hero-art { position: relative; }
.hero-art::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  background: repeating-linear-gradient(0deg, var(--blush-deep), var(--blush-deep) 26px, transparent 26px, transparent 34px);
  border-radius: var(--radius); z-index: -1;
}
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 1rem; font-family: inherit; cursor: pointer;
  background: var(--accent); color: #fff; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- sections & cards ---------- */
.section { padding: 44px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: var(--blush); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 a { color: var(--ink); }
.card-body p { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.card-link { font-weight: 700; font-size: .93rem; }

/* placeholder card art when no hero image exists */
.card-art {
  aspect-ratio: 3/2; display: grid; place-items: center; font-size: 2.2rem;
  background: linear-gradient(135deg, var(--blush), var(--blush-deep));
  color: var(--accent-dark);
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: .86rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line); }

/* ---------- article ---------- */
.article-hero { border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 22px 0 8px; aspect-ratio: 21/9; object-fit: cover; width: 100%; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 24px 0 56px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.article h2 { margin-top: 1.8em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .4em; }
.article table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.article th, .article td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article th { background: var(--blush); }
.article blockquote {
  margin: 1.2em 0; padding: 14px 20px; border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted);
}
.article-layout > aside { position: sticky; top: 84px; align-self: start; }
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.toc h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.toc ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.toc li { margin: 7px 0; }
.aside-cta {
  margin-top: 20px; background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 20px; font-size: .95rem;
}
.aside-cta a { color: #ffcdb8; font-weight: 700; }
.aside-cta p { margin-bottom: .6em; }

/* answer-first summary box under article H1s */
.tldr {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px;
  margin-top: 14px; font-size: 1.02rem;
}

/* ---------- FAQ ---------- */
.faq-list { }
details.faq {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 20px; margin-bottom: 10px;
}
details.faq summary {
  font-weight: 700; cursor: pointer; padding: 12px 0; list-style: none; position: relative; padding-right: 30px;
}
details.faq summary::after { content: "+"; position: absolute; right: 4px; font-size: 1.3rem; color: var(--accent); }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 0 0 14px; }

/* ---------- tool UI ---------- */
.tool-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; margin: 26px 0;
}
.dropzones { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .dropzones { grid-template-columns: 1fr; } }
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  background: var(--bg); min-height: 210px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone img.preview { max-height: 160px; width: auto; border-radius: 8px; box-shadow: var(--shadow); }
.dropzone .dz-label { font-weight: 700; }
.dropzone .dz-hint { color: var(--muted); font-size: .87rem; }
.dropzone input[type="file"] { display: none; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 6px; font-size: .92rem; color: var(--muted); }
.consent-row input { margin-top: 4px; accent-color: var(--accent); }

.tool-status { margin-top: 16px; }
.progress-track { height: 8px; border-radius: 999px; background: var(--blush); overflow: hidden; display: none; }
.progress-bar {
  height: 100%; width: 30%; border-radius: 999px; background: var(--accent);
  animation: slide 1.6s ease-in-out infinite;
}
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
.status-msg { font-size: .95rem; color: var(--muted); margin-top: 8px; min-height: 1.4em; }
.status-msg.error { color: #b3341f; font-weight: 600; }
.result-wrap { margin-top: 18px; display: none; }
.result-wrap img { border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 560px; width: auto; max-width: 100%; }

.style-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.style-chip {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--bg); cursor: pointer; font-weight: 600; font-size: .92rem; font-family: inherit;
}
.style-chip.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
textarea.prompt-input, input.text-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font: inherit; background: var(--bg); resize: vertical; min-height: 90px;
}
textarea.prompt-input:focus, input.text-input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.aspect-row { display: flex; gap: 10px; align-items: center; margin: 14px 0; flex-wrap: wrap; color: var(--muted); font-size: .93rem; }

/* photo strip tool */
.strip-layout { display: grid; grid-template-columns: 1fr 260px; gap: 30px; align-items: start; }
@media (max-width: 760px) { .strip-layout { grid-template-columns: 1fr; } }
.strip-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.strip-canvas-wrap { text-align: center; }
#stripCanvas { width: 100%; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); background: #fff; }
.frame-options { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.frame-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.frame-swatch.selected { outline: 3px solid var(--accent); }

/* ---------- Singapore map ---------- */
.sg-map-wrap { max-width: 760px; margin: 0 auto; }
.sg-map { width: 100%; height: auto; display: block; }
.sg-island {
  fill: var(--blush); stroke: var(--blush-deep); stroke-width: 2.5;
}
.sg-sea { fill: var(--muted); font-size: 15px; font-style: italic; opacity: .55; }
.sg-pin { cursor: pointer; text-decoration: none; }
.sg-dot { fill: var(--accent); stroke: #fff; stroke-width: 2.5; transition: r .15s; }
.sg-dot-halo { fill: var(--accent); opacity: 0; transition: opacity .15s; }
.sg-label {
  fill: var(--ink); font-size: 17px; font-weight: 700;
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round;
}
.sg-pin:hover .sg-dot, .sg-pin:focus .sg-dot { r: 10; }
.sg-pin:hover .sg-dot-halo, .sg-pin:focus .sg-dot-halo { opacity: .18; }
.sg-pin:hover .sg-label, .sg-pin:focus .sg-label { fill: var(--accent-dark); }
.sg-map-hint { text-align: center; font-size: .9rem; margin-top: 4px; }
.sg-credit { font-size: .72rem; opacity: .7; }

/* ---------- promo strip ---------- */
.promo-strip {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 30px 32px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin: 10px 0;
}
.promo-strip h2 { margin: 0 0 4px; }
.promo-strip p { margin: 0; color: #cfc4bb; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d8cec6; margin-top: 60px; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-heading { color: #fff; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 .6em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 8px 0; }
.footer-col a { color: #d8cec6; font-size: .93rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #3b342e; margin-top: 34px; padding-top: 20px; font-size: .88rem; color: #a99e95; }
.footer-note { font-size: .8rem; }

/* ---------- misc ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pill-list a {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink);
}
.pill-list a:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.error-page { padding: 90px 0; text-align: center; }

/* example gallery on tool pages */
.example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
@media (max-width: 680px) { .example-grid { grid-template-columns: 1fr; } }
.example-grid figure { margin: 0; }
.example-grid img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.example-grid figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* print view: article body only (used by the pose shot-list print button) */
@media print {
  .site-header, .site-footer, .breadcrumbs, aside, .btn, .card, .section-alt,
  .article-hero, .promo-strip, .faq-list { display: none !important; }
  .article-layout { display: block; }
  body { background: #fff; }
}
