/* Ellis Laundry & Linen Supply Inc. Written fresh for this site.
   Chassis: A32 envelope header, B14 translucent centered hero panel, C4 soft button,
   D7 kraft insets with stitched edges, E20 focus drift, F12 shelf elevation, H8 tidal. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
[id] { scroll-margin-top: 24px; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  margin: 0 0 var(--s2);
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.05rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 var(--s2); max-width: var(--measure); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--thread); text-decoration-color: var(--thread-dim); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--thread); color: var(--linen); }
* { scrollbar-color: var(--kraft-deep) var(--paper-dim); }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; border-radius: var(--radius); }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 60;
  background: var(--ink); color: var(--linen); padding: 10px 18px; border-radius: var(--radius);
}
.skip:focus-visible { left: 8px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(18px, 4vw, 44px); }
.small { font-size: 0.85rem; color: var(--ink-soft); }
.source-note { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.02em; }

/* ---------- E20 ambient: focus drift between two close tints ---------- */
.tint-drift {
  position: fixed; inset: 0; z-index: -1;
  background: var(--paper-dim);
  opacity: 0; pointer-events: none;
}
html[data-anim] .tint-drift { animation: tintDrift 30s ease-in-out infinite; }
@keyframes tintDrift { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ---------- A32 envelope header ---------- */
.env {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E"),
    var(--kraft);
}
.env-face {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s3); padding-top: var(--s3);
}
.env-address { max-width: 30rem; }
.env-name {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.2; color: var(--ink); margin: 0;
}
.env-name a { color: inherit; text-decoration: none; }
.env-lines { margin: 4px 0 0; font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.postmark { flex: none; display: flex; align-items: center; gap: 6px; }
.postmark svg { display: block; }

/* nav along the flap line */
.flap { position: relative; margin-top: var(--s2); }
.flap-line { display: block; width: 100%; height: 46px; }
.flap-nav {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(28px, 7vw, 84px);
  margin: 0; padding: 0; list-style: none;
}
.flap-nav a {
  display: inline-block; padding: 2px 10px 4px;
  font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  background: var(--kraft); /* the line passes behind the words, not through them */
  border-bottom: 2px solid transparent;
  transition: border-color 220ms ease, transform 220ms ease;
}
.flap-nav a:hover { border-bottom-color: var(--thread); transform: translateY(-1px); }
.flap-nav a[aria-current="page"] { border-bottom-color: var(--thread); }
.flap-nav li:nth-child(2) { transform: translateY(17px); }
.menu-btn { display: none; }
@media (min-width: 761px) { .flap-nav[hidden] { display: flex; } }

/* mobile flap menu */
@media (max-width: 760px) {
  :root { --header-h: 92px; }
  .env-face { padding-top: var(--s2); }
  .postmark svg { width: 62px; height: 62px; }
  .flap { margin-top: var(--s1); }
  .flap-line { height: 30px; }
  .flap-nav {
    position: absolute; inset: auto 0 auto 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E"),
      var(--kraft);
    border-bottom: 2px dashed var(--thread-dim);
    padding: var(--s1) 0 var(--s2);
    z-index: 40;
    transform-origin: top center;
  }
  .flap-nav[hidden] { display: none; }
  .flap-nav li:nth-child(2) { transform: none; }
  .flap-nav a { display: block; padding: 12px clamp(18px, 4vw, 44px); font-size: 0.95rem; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px dashed var(--thread-dim); border-radius: var(--radius);
    font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink); padding: 10px 14px; cursor: pointer;
  }
  .menu-btn .x { display: none; }
  .menu-btn[aria-expanded="true"] .x { display: inline; }
  .menu-btn[aria-expanded="true"] .o { display: none; }
}

/* ---------- B14 hero: image with translucent centered panel ---------- */
.hero { position: relative; min-height: 76vh; display: grid; place-items: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-panel {
  position: relative; z-index: 2;
  margin: clamp(56px, 10vh, 120px) auto;
  width: min(92%, 620px);
  text-align: center;
  background: rgba(255, 249, 238, 0.84);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  border: 2px dashed var(--thread-dim);
  border-radius: var(--radius);
  padding: clamp(26px, 4.5vw, 48px) clamp(20px, 4vw, 52px);
  box-shadow: 0 10px 34px rgba(54, 42, 27, 0.14);
}
.hero-panel p { margin-inline: auto; }

/* ---------- C4 CTA: one soft-cornered filled button + plain phone line ---------- */
.btn {
  display: inline-block;
  background: var(--thread); color: var(--linen);
  font-family: var(--font-body); font-size: 1rem; letter-spacing: 0.03em;
  padding: 14px 30px; border: 0; border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer;
  transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.btn:hover { background: #7C2D1B; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(54, 42, 27, 0.22); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.phone-line { margin: var(--s2) 0 0; font-size: 1.02rem; }
.phone-line a { color: var(--ink); text-decoration-color: var(--thread-dim); white-space: nowrap; }

/* ---------- sections and D7 kraft insets ---------- */
.section { padding-block: clamp(56px, 9vw, 110px); }
.section-tight { padding-block: clamp(36px, 6vw, 72px); }
.inset {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E") ,
    var(--kraft);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2.2 2.2l5.6 5.6M7.8 2.2l-5.6 5.6' stroke='%238F3521' stroke-width='1.3' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2.2 2.2l5.6 5.6M7.8 2.2l-5.6 5.6' stroke='%238F3521' stroke-width='1.3' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2.2 2.2l5.6 5.6M7.8 2.2l-5.6 5.6' stroke='%238F3521' stroke-width='1.3' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2.2 2.2l5.6 5.6M7.8 2.2l-5.6 5.6' stroke='%238F3521' stroke-width='1.3' opacity='0.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-position: 8px 8px, calc(100% - 8px) 8px, 8px calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), 0 0;
  border: 1px dashed var(--thread-dim);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 44px);
}

/* stitched divider (SVG line, stroke animated by GSAP) */
.stitch { display: block; width: 100%; height: 4px; overflow: visible; }
.stitch line { stroke: var(--thread-dim); stroke-width: 2; stroke-dasharray: 11 8; }

/* two-column media rows */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.row.rev > .row-media { order: 2; }
.row-media img { border-radius: var(--radius); width: 100%; }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; }
  .row.rev > .row-media { order: 0; }
}

/* laundry-tag caption */
.tagcap {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 7px 14px 7px 10px;
  background: var(--kraft); border: 1px solid var(--kraft-deep); border-radius: var(--radius);
  font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.03em;
  transform-origin: left center;
}
.tagcap svg { flex: none; }

/* ---------- F12 signature: the shelf elevation ---------- */
.rack-wrap { overflow-x: auto; }
.rack { width: 100%; max-width: 880px; margin: 0 auto; display: block; min-width: 560px; }
.rack .frame { stroke: var(--ink); stroke-width: 2.4; fill: none; }
.rack .shelf { stroke: var(--ink); stroke-width: 2; fill: none; }
.rack .goods { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.rack .goods-solid { fill: rgba(54, 42, 27, 0.10); }
.rack .goods-dashed { stroke-dasharray: 5 5; stroke: var(--ink-soft); }
.rack .bay-label { font-family: var(--font-body); font-size: 14.5px; fill: var(--ink); letter-spacing: 0.04em; }
.rack .bay-src { font-family: var(--font-body); font-size: 12px; fill: var(--ink-soft); }
.rack .thread-mark { stroke: var(--thread); stroke-width: 1.6; fill: none; }
.rack-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); }
.rack-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ink-soft); }
.rack-legend i { width: 26px; height: 0; border-top: 2px solid var(--ink); }
.rack-legend .dash i { border-top-style: dashed; border-top-color: var(--ink-soft); }

/* ---------- the record ---------- */
.record-list { margin: 0; padding: 0; list-style: none; max-width: 46rem; }
.record-list li { padding: var(--s2) 0; border-bottom: 1px dashed var(--hairline); }
.record-list li:first-child { border-top: 1px dashed var(--hairline); }
.record-list .source-note { display: block; margin-top: 3px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); }
.cta-band h2 { color: var(--linen); }
.cta-band p { color: var(--paper); }
.cta-band .small, .cta-band .source-note { color: rgba(247, 242, 232, 0.72); }
.cta-band a { color: var(--linen); }
.cta-band .btn { background: var(--thread); color: var(--linen); }
.cta-band .btn:hover { background: #A64430; }

/* ---------- footer: the envelope back ---------- */
footer {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E"),
    var(--kraft);
  border-top: 2px dashed var(--thread-dim);
  padding: var(--s6) 0 calc(var(--s6) + 64px);
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s4); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-name { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 6px; }
.foot-head { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 var(--s1); }
footer ul { margin: 0; padding: 0; list-style: none; }
footer li { margin-bottom: 2px; }
footer li a { display: inline-block; padding: 6px 0; min-height: 32px; color: var(--ink); }
.foot-note { margin-top: var(--s4); padding-top: var(--s2); border-top: 1px dashed var(--hairline); font-size: 0.78rem; color: var(--ink-soft); }
@media (min-width: 761px) { footer { padding-bottom: var(--s6); } }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.82rem; letter-spacing: 0.03em; color: var(--ink-soft); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 12px 14px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--linen); border: 1px solid var(--kraft-deep); border-radius: var(--radius);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--thread); box-shadow: 0 0 0 3px rgba(143, 53, 33, 0.18);
}
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-msg { display: none; margin-top: var(--s2); padding: var(--s2) var(--s3); border: 1px dashed var(--thread-dim); border-radius: var(--radius); background: var(--kraft); }
.form-msg.show { display: block; }

/* ---------- mobile sticky call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: none; gap: 1px; background: var(--ink);
  transition: transform 260ms ease;
}
.callbar.hide { transform: translateY(110%); }
.callbar a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; font-size: 0.95rem; text-decoration: none;
}
.callbar .cb-call { background: var(--thread); color: var(--linen); }
.callbar .cb-note { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) { .callbar { display: flex; } }

/* ---------- icons ---------- */
.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; vertical-align: -3px; }

/* ---------- motion gating ---------- */
html[data-anim] [data-reveal] { opacity: 0; transform: translateY(16px); }
html[data-anim] .hero-panel[data-hero] { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* uniform rail placeholder (honest gap drawing) */
.gap-rail { width: 100%; max-width: 420px; display: block; }
.gap-rail line, .gap-rail path, .gap-rail rect { stroke: var(--ink-soft); stroke-width: 1.6; fill: none; stroke-dasharray: 5 5; }
