/* Layout: one narrow column for a phone held in one hand. Hero, save button, 2x2 contact tiles, flip cards, contact form. */
:root {
  --bg: #F0F5F7;
  --bg2: #E3ECEF;
  --surface: #FFFFFF;
  --line: rgba(16, 24, 40, .09);
  --line-strong: rgba(16, 24, 40, .2);
  --text: #10151C;
  --muted: #586170;
  --faint: #868F9D;
  --accent: #0E7490;
  --accent-ink: #FFFFFF;
  --accent-text: #0E7490;
  --accent-soft: rgba(14, 116, 144, .1);
  --glow: rgba(14, 116, 144, .14);
  --wa: #25D366;
  --wa-ink: #05210F;
  --wa-text: #0E8A43;
  --li-text: #0A66C2;
  --ig-text: #C2337A;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 16px 32px -24px rgba(16, 24, 40, .35);

  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --r-lg: 22px;
  --r-md: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.22, 1.2, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080D10;
    --bg2: #0E1518;
    --surface: #12191D;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .18);
    --text: #EEF1F6;
    --muted: #9AA3B2;
    --faint: #6C7584;
    --accent: #4FD1E8;
    --accent-ink: #04141A;
    --accent-text: #4FD1E8;
    --accent-soft: rgba(79, 209, 232, .13);
    --glow: rgba(79, 209, 232, .11);
    --wa-text: #3FE07F;
    --li-text: #5AA9F0;
    --ig-text: #F27DB4;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 40px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #080D10;
  --bg2: #0E1518;
  --surface: #12191D;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #EEF1F6;
  --muted: #9AA3B2;
  --faint: #6C7584;
  --accent: #4FD1E8;
  --accent-ink: #04141A;
  --accent-text: #4FD1E8;
  --accent-soft: rgba(79, 209, 232, .13);
  --glow: rgba(79, 209, 232, .11);
  --wa-text: #3FE07F;
  --li-text: #5AA9F0;
  --ig-text: #F27DB4;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 40px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

/* Schematic-paper backdrop: a faint grid that fades out below the hero */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(110% 55% at 50% -8%, var(--glow), transparent 62%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px;
  -webkit-mask: linear-gradient(#000, transparent 58%);
  mask: linear-gradient(#000, transparent 58%);
}

.wrap {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding-block: 0 calc(36px + env(safe-area-inset-bottom));
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
}
main { transition: opacity .26s var(--ease), transform .26s var(--ease); }
main.swap { opacity: 0; transform: translateY(6px); }
section { margin-top: 52px; }

.h {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  margin-bottom: 16px;
}
.h::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.h .sub { order: 3; font-weight: 400; font-size: 12px; color: var(--faint); }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 560px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
}
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--bg) 55%, transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.top.scrolled::before { opacity: 1; }
.mini { display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-6px); transition: .45s var(--ease); pointer-events: none; }
.top.scrolled .mini { opacity: 1; transform: none; pointer-events: auto; }
.mini img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.mini b { font-size: 14px; font-weight: 600; }
.tools { display: flex; gap: 8px; }
.pill {
  height: 40px; min-width: 40px; padding: 0 13px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
  transition: transform .35s var(--spring), border-color .3s;
}
.pill:active { transform: scale(.92); }
.pill .i { width: 17px; height: 17px; }
.wa-top { background: var(--wa); color: var(--wa-ink); border-color: transparent; opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .4s var(--ease), transform .5s var(--spring); }
.top.scrolled .wa-top { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 440px) { .mini b { display: none; } }

/* Hero */
.hero { text-align: center; margin-top: 8px; }
.avatar { position: relative; width: 112px; height: 112px; margin: 0 auto 16px; }
.avatar::before {
  content: ""; position: absolute; inset: -22px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.avatar::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--accent);
}
.avatar img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); }

.hero h1 { font-size: clamp(28px, 8vw, 36px); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.hero .alt { font-size: 12.5px; color: var(--faint); margin-top: 4px; letter-spacing: .06em; }
.hero .role { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.hero .line {
  margin: 12px auto 0; max-width: 20ch;
  font-size: clamp(21px, 6vw, 25px); font-weight: 600; line-height: 1.5; text-wrap: balance;
}
.hero .line span { color: var(--accent-text); }
.loc { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); margin-top: 12px; }
.loc .i { width: 14px; height: 14px; }

.avail { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 12.5px; }
.avail .lbl { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-inline-end: 2px; }
.avail em { font-style: normal; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wa); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3); opacity: 0; } }

/* Primary action + contact tiles */
.save {
  margin-top: 20px; height: 56px; width: 100%; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 16px; font-weight: 600;
  box-shadow: 0 14px 28px -14px var(--accent);
  transition: transform .45s var(--spring);
}
.save:active { transform: scale(.97); }
.save .i { width: 20px; height: 20px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  text-align: start;
  transition: transform .45s var(--spring), border-color .3s;
}
.tile:active { transform: scale(.965); }
.tile .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-size: 19px; background: var(--accent-soft); color: var(--accent-text); }
.tile.wa .ic { color: var(--wa-text); background: color-mix(in srgb, var(--wa-text) 13%, transparent); }
.tile.wa .ic .i { width: 23px; height: 23px; }

.cvrow {
  margin-top: 10px; height: 48px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px dashed var(--line-strong); font-size: 14px; font-weight: 500;
  transition: transform .45s var(--spring), border-color .3s;
}
.cvrow:active { transform: scale(.97); }
.cvrow small { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); }
.tile .tx { min-width: 0; }
.tile b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.tile small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) {
  .tile:hover, .pill:hover { border-color: var(--line-strong); }
}

/* Cards */
.card {
  position: relative; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* Flip cards */
.flips { display: grid; gap: 12px; align-items: start; }
.flip { display: grid; perspective: 1400px; cursor: pointer; }
.flip-in { position: relative; display: grid; transform-style: preserve-3d; transition: transform .9s var(--spring), min-height .5s var(--ease); }
.flip.on .flip-in { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 18px; display: flex; flex-direction: column; overflow: hidden; }
/* The front sets the card's size. The back sits on top of it, and the card grows to fit the back only while flipped. */
.back { position: absolute; inset: 0; transform: rotateY(180deg); }
.flip:not(.on) .back, .flip.on .front { pointer-events: none; }

.f-top { display: flex; justify-content: space-between; align-items: center; }
.f-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; background: var(--accent-soft); color: var(--accent-text); }
.f-period { font-size: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.f-role { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.front h3 { margin-top: 16px; font-size: 21px; font-weight: 700; line-height: 1.35; }
.b-img { width: 100%; height: 132px; object-fit: cover; object-position: 50% 40%; border-radius: 14px; margin-bottom: 12px; }
.f-what { font-size: 13px; color: var(--muted); }
.f-tease {
  margin-top: 14px; padding: 11px 14px; border-radius: 14px;
  background: var(--bg2); font-size: 14.5px; font-weight: 500; line-height: 1.6;
  min-height: 69px; display: flex; align-items: center;
}
.f-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; font-size: 12px; }
.hint { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); margin-inline-start: auto; }
.hint .i { width: 14px; height: 14px; transition: transform .6s var(--spring); }
.flip.on .hint .i { transform: rotate(180deg); }

.b-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.b-head .f-ico { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.b-head b { font-size: 15px; font-weight: 600; }
.back ul { list-style: none; display: grid; gap: 9px; }
.back li { position: relative; font-size: 13.5px; line-height: 1.75; padding-inline-start: 16px; }
.back li::before { content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent); }
.visit { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.visit .i { width: 14px; height: 14px; }
[dir="rtl"] .visit .i { transform: scaleX(-1); }

/* Contact */
.form { padding: 18px; display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg2); font-size: 16px;
  transition: border-color .3s, box-shadow .3s; appearance: none; -webkit-appearance: none;
}
.form textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.send {
  height: 52px; border-radius: 16px; background: var(--wa); color: var(--wa-ink);
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .45s var(--spring);
}
.send:active { transform: scale(.96); }

.rows { margin-top: 10px; padding: 4px 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; font-size: 13.5px; }
.row + .row { border-top: 1px dashed var(--line); }
.row .val { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); min-width: 0; }
.row .val span { direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row button { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 600; color: var(--accent-text); padding: 7px 11px; border-radius: 999px; background: var(--accent-soft); }
.row .i { width: 15px; height: 15px; }

footer { margin-top: 44px; text-align: center; }
.fbtns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.fbtns .pill { height: 46px; padding: 0 18px; font-weight: 500; }
.copyr { margin-top: 20px; font-size: 11.5px; color: var(--faint); }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px) scale(.96); opacity: 0;
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: all .5s var(--spring); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast .i { width: 16px; height: 16px; }

/* Scroll reveal */
.rv { opacity: 0; transform: translateY(20px) scale(.985); transition: opacity .8s var(--ease), transform .9s var(--spring); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  section { margin-top: 64px; }
  .flips { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}
