/* Smile2Me, a proposed site. Phone first (390px), desktop second.
   One idea: the name is the logo. Its letters arrive a little crooked and
   settle into line, the way teeth do, and the line under them lifts into a
   smile. Their own orange and their own boxed "2", without the cartoon tooth.
   The base CSS is the finished page; every start state lives inside the
   no-preference block at the end. */

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  --ground: #fffaf3;
  --paper: #ffffff;
  --sand: #f7efe4;
  --ink: #1f1b16;
  --soft: #6b625a;
  --line: #ebe1d2;
  --orange-hi: #ffa53a;
  --orange: #e57a00;
  --orange-deep: #c45f00;   /* white text on it: 4.2:1, used only at 18px bold and up */
  --link: #b05200;          /* 4.9:1 on the ground */
  --wa: #12833f;
  --gutter: 20px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  /* A spring as a curve: damping .72, response .5 s, settles inside .9 s. */
  --settle: linear(0, .042, .145, .277, .418, .554, .675, .778, .861, .925, .971, 1.003, 1.023, 1.034, 1.038, 1.038, 1.035, 1.03, 1.025, 1.019, 1.014, 1.01, 1.007, 1.004, 1.002, 1, .999, 1);
  /* A livelier one for the smile: damping .6, response .55 s. */
  --lift: linear(0, .053, .181, .346, .519, .68, .817, .926, 1.005, 1.056, 1.084, 1.094, 1.092, 1.081, 1.066, 1.05, 1.034, 1.02, 1.009, 1.001, .996, .993, .991, .991, .992, .995, .998, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Hebrew", "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 2.5px solid var(--orange-deep); outline-offset: 3px; border-radius: 10px; }

/* The wordmark, small: header and footer. Fredoka is close to the rounded
   lettering of their 2004 logo; the boxed 2 is theirs. */
.mini, .foot-mark {
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-weight: 600; letter-spacing: -.01em; color: var(--ink);
}
.mini-two {
  display: inline-grid; place-items: center;
  width: .9em; height: .98em; margin: 0 .06em; border-radius: .2em;
  background: linear-gradient(160deg, var(--orange-hi), var(--orange-deep));
  color: #fff; font-size: .86em; line-height: 1;
}

/* Header: opaque on a phone, glass only on a large screen. */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding-inline: var(--gutter) 10px;
  padding-top: env(safe-area-inset-top);
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-mark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 22px; transition: opacity 200ms ease; }
.bar.at-hero .bar-mark { opacity: 0; pointer-events: none; }
.bar-end { display: flex; align-items: center; gap: 6px; }
.bar-ru {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px;
  color: var(--ink); font-size: 16px; font-weight: 600; text-decoration: none;
}
.bar-call {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange-deep); color: #fff;
  transition: transform 140ms var(--ease-out);
}
.bar-call:active { transform: scale(.94); }

/* Hero: the first screen at 390 says who, what, where and how to call. */
.hero {
  text-align: center; padding: 20px var(--gutter) 40px;
  /* A soft warm light behind the name, from their own orange. */
  background: radial-gradient(120% 46% at 50% 14%, #ffecd2 0%, rgba(255, 236, 210, 0) 72%), var(--ground);
}
.eyebrow { margin: 0 0 6px; color: var(--soft); font-size: 16px; font-weight: 600; }
h1 { margin: 0; font-weight: 400; }
.mark {
  display: inline-flex; align-items: baseline; justify-content: center;
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-weight: 600; font-size: clamp(64px, min(18.6vw, 21vh), 184px); line-height: 1.04;
  letter-spacing: -.025em; color: var(--ink);
}
.mark .t { display: inline-block; transform-origin: 50% 88%; }
.mark .two {
  display: inline-grid; place-items: center;
  width: .76em; height: .84em; margin: 0 .07em 0 .05em; border-radius: .17em;
  background: linear-gradient(160deg, var(--orange-hi), var(--orange-deep));
  color: #fff; font-size: .9em; line-height: 1; letter-spacing: 0;
  box-shadow: 0 .05em .12em -.03em rgba(196, 95, 0, .45);
}
.smile {
  display: block; width: min(62%, 560px); height: auto; margin: -.1em auto 0;
  overflow: visible;
}
.smile { filter: drop-shadow(0 5px 6px rgba(229, 122, 0, .22)); }
.smile path { stroke-width: 10px; transform-box: fill-box; transform-origin: 50% 100%; }
.who {
  display: block; margin-top: 18px;
  font-size: clamp(25px, 6.6vw, 42px); font-weight: 800; line-height: 1.18;
  letter-spacing: -.02em; text-wrap: balance;
}
.lede {
  margin: 10px auto 0; max-width: 28ch; color: var(--soft);
  font-size: clamp(18px, 4.7vw, 22px); line-height: 1.5; text-wrap: balance;
}

.cta { display: grid; gap: 12px; width: 100%; max-width: 360px; margin: 26px auto 0; }
.call, .wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 24px; border-radius: 999px;
  font-size: 19px; font-weight: 700; text-decoration: none;
  transition: transform 140ms var(--ease-out), box-shadow 200ms ease;
}
.call { background: var(--orange-deep); color: #fff; box-shadow: 0 10px 24px -14px rgba(196, 95, 0, .8); }
.wa { background: var(--paper); color: var(--wa); box-shadow: inset 0 0 0 1.5px rgba(18, 131, 63, .4); }
.call:active, .wa:active { transform: scale(.97); }

.where { margin-top: 26px; }
.address { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 8px; }
.kit-nav {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 8px 12px; border-radius: 999px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease-out);
}
.kit-nav:active { transform: scale(.97); }
.kit-nav .kit-mark { width: 20px; height: 20px; border-radius: 5px; }

/* Sections */
.section { padding: clamp(60px, 11vw, 120px) var(--gutter); }
.wrap { max-width: 1080px; margin: 0 auto; }
h2 {
  margin: 0; font-size: clamp(30px, 7.6vw, 52px); font-weight: 800;
  line-height: 1.12; letter-spacing: -.025em; text-wrap: balance;
}
h3 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.sub { margin: 12px 0 0; max-width: 36ch; color: var(--soft); font-size: 18px; text-wrap: pretty; }

/* The clinic's own photos, in the first screen; never wider than their 312 pixels. */
.photos {
  list-style: none; margin: 30px auto 0; padding: 0; max-width: 1080px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.clinic { background: var(--paper); }
.clinic .nav { justify-content: start; margin-top: 22px; }
.photos img { width: 100%; max-width: 312px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; background: var(--sand); }
.tour {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 18px;
  color: var(--link); font-size: 18px; font-weight: 700; text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .tour:hover { text-decoration: underline; text-underline-offset: 4px; } }

/* Treatments: a plain list, each row marked with a small smile. */
.treat { list-style: none; margin: 30px 0 0; padding: 0; }
.treat li {
  position: relative; padding-block: 18px; padding-inline: 28px 0; border-top: 1px solid var(--line);
}
.treat li:last-child { border-bottom: 1px solid var(--line); }
.treat li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 27px; width: 10px; height: 10px;
  border-radius: 3px; background: linear-gradient(160deg, var(--orange-hi), var(--orange-deep));
}
.treat p { margin: 4px 0 0; color: var(--soft); font-size: 17px; }
.care { margin: 22px 0 0; max-width: 46ch; color: var(--soft); font-size: 16px; }

/* Team: their portraits are 198 by 153, so they stay small and sharp. */
.team { background: var(--sand); }
.people {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; gap: 14px;
}
.people li {
  display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center;
  padding: 12px; border-radius: 20px; background: var(--paper);
}
.people img { width: 104px; height: 80px; object-fit: cover; border-radius: 14px; }
.people p { margin: 2px 0 0; font-size: 16px; color: var(--soft); line-height: 1.45; }
.people .role { color: var(--link); font-weight: 600; }

/* Their words, quoted as their site prints them. */
.quotes { display: grid; gap: 18px; margin-top: 28px; }
.quotes figure { margin: 0; padding: 26px 24px 22px; border-radius: 24px; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgba(80, 50, 20, .35); }
.quotes blockquote { margin: 0; }
.quotes blockquote p {
  margin: 0; font-size: clamp(20px, 5.2vw, 25px); font-weight: 600; line-height: 1.45; letter-spacing: -.01em;
  text-wrap: pretty;
}
.quotes blockquote p::before { content: "\201D"; display: block; height: .55em; margin-bottom: .1em; color: var(--orange); font: 700 2.2em/1 "Fredoka", Georgia, serif; }
.quotes figcaption { margin-top: 14px; color: var(--soft); font-size: 16px; font-weight: 600; }

.funds { background: var(--paper); }
.chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 9px 16px; border-radius: 999px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 17px; font-weight: 600;
}

.visit { background: var(--ground); text-align: center; }
.visit .sub { margin-inline: auto; }
.visit .nav { margin-top: 18px; }

.ru { background: var(--paper); padding-block: 48px; }
.ru h2 { font-size: clamp(24px, 6vw, 32px); }
.ru p { margin: 10px 0 0; max-width: 52ch; font-size: 17px; }
.ru-call { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.foot { padding: 40px var(--gutter) calc(48px + env(safe-area-inset-bottom)); background: var(--ink); color: #e9e2d8; text-align: center; }
.foot p { margin: 6px 0 0; font-size: 16px; }
.foot .foot-mark { margin: 0 0 6px; font-size: 26px; color: #fff; }
.foot .note { color: #b4aa9c; }
.foot a { color: #ffc27a; display: inline-flex; align-items: center; min-height: 44px; }

/* Tablet and up */
@media (min-width: 700px) {
  :root { --gutter: 32px; }
  .photos { grid-template-columns: repeat(4, minmax(0, 312px)); gap: 14px; }
  .treat { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .treat li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .people { grid-template-columns: 1fr 1fr; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .visit .cta, .hero .cta { grid-template-columns: 1fr 1fr; max-width: 560px; }
}
@media (min-width: 1024px) {
  .hero { padding-top: 56px; padding-bottom: 72px; }
  .people { grid-template-columns: repeat(3, 1fr); }
  .people li { grid-template-columns: 120px 1fr; }
  .people img { width: 120px; height: 93px; }
  .bar { height: 64px; background: rgba(255, 250, 243, .82); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
  .smile path { stroke-width: 15px; }
}
@media (min-width: 700px) and (max-width: 1023px) { .smile path { stroke-width: 12px; } }
@media (hover: hover) and (pointer: fine) {
  .call:hover { box-shadow: 0 14px 30px -14px rgba(196, 95, 0, .9); }
  .kit-nav:hover, .wa:hover { box-shadow: inset 0 0 0 1.5px rgba(18, 131, 63, .6); }
  .kit-nav:hover { box-shadow: inset 0 0 0 1px #d8cab5; }
}
@media (prefers-reduced-transparency: reduce) { .bar { background: var(--ground); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Motion. Only here, only when the visitor has not asked for less.
   The letters come in crooked and settle into line, one after another; then
   the line under them lifts at both ends into a smile. Sections fade up once. */
@media (prefers-reduced-motion: no-preference) {
  .mark .t {
    animation: align 900ms both;
    animation-timing-function: cubic-bezier(.3, 1.25, .5, 1);
    animation-timing-function: var(--settle);
    animation-delay: calc(240ms + var(--i) * 55ms);
  }
  .smile path {
    animation: lift 1100ms both;
    animation-timing-function: cubic-bezier(.3, 1.4, .5, 1);
    animation-timing-function: var(--lift);
    animation-delay: 1000ms;
  }
  .motion [data-reveal]:not(.in) { opacity: 0; transform: translateY(18px); }
  .motion [data-reveal] { transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); }
}
@keyframes align {
  from { transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  to { transform: none; }
}
@keyframes lift {
  from { transform: scaleY(.03); }
  to { transform: none; }
}
