/* Digital business card, styled after twomindsdev.com.
   Brand colours come from card.config.json and are injected on :root
   (--bg, --fg, --accent, --on-accent, --surface, --line, --muted, --label).
   Fonts are self-hosted from @fontsource (see server.js /fonts). */

/* ---------- fonts ---------- */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/figtree-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/figtree-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/figtree-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/figtree-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/young-serif-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/young-serif-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */

:root {
  --bg: #143c46;
  --fg: #f8e4dc;
  --accent: #f2b84b;
  --on-accent: #143c46;
  --surface: color-mix(in srgb, var(--bg) 78%, #000);
  --line: color-mix(in srgb, var(--fg) 22%, var(--bg));
  --muted: color-mix(in srgb, var(--fg) 78%, var(--bg));
  --label: color-mix(in srgb, var(--fg) 62%, var(--bg));
  --field-line: color-mix(in srgb, var(--line) 55%, var(--fg));
  --chip: color-mix(in srgb, var(--fg) 8%, var(--surface));
  --hover: color-mix(in srgb, var(--fg) 5%, var(--surface));
  --radius: 18px;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.i {
  flex: none;
  width: 20px;
  height: 20px;
}

.i-sm {
  width: 16px;
  height: 16px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}

.eyebrow .sep {
  margin: 0 0.5em;
  opacity: 0.8;
}

/* ---------- layout ---------- */

.layout {
  max-width: 480px;
  margin: 0 auto;
  padding: max(36px, env(safe-area-inset-top)) 16px max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- profile ---------- */

.profile {
  padding: 4px 4px 12px;
}

.avatar {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 0 22px -10px; /* the mark sits on a background-coloured tile; pull it flush with the text */
  border-radius: 18px;
  transition: transform 0.3s ease;
}

.profile:hover .avatar {
  transform: rotate(-6deg);
}

.profile h1 {
  margin-top: 10px;
  font-size: clamp(2.75rem, 13vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 38rem;
}

/* ---------- buttons ---------- */

.actions {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--field-line);
}

.btn.is-disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.btn .soon {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--label);
}

.btn-row {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 0.8px solid var(--line);
  border-radius: var(--radius);
}

.chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--fg);
}

.chev {
  width: 18px;
  height: 18px;
  color: var(--label);
}

/* contact rows */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.contact-list li + li a {
  border-top: 0.8px solid var(--line);
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.contact-list a:active {
  background: var(--hover);
}

.row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.row-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}

.row-value {
  font-size: 1.0625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* services */

.services {
  padding: 22px 20px 20px;
}

.svc-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.svc-list li + li {
  border-top: 0.8px solid var(--line);
}

.svc-list a,
.svc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
}

.svc-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.svc-time {
  flex: none;
  font-size: 0.875rem;
  color: var(--label);
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.text-link .i {
  transition: transform 0.2s ease;
}

/* call to action */

.cta {
  padding: 26px 20px 22px;
}

.cta h2 {
  margin-top: 10px;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.cta .muted {
  margin-top: 12px;
}

/* collapsible panels */

.panel summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  border-radius: var(--radius);
}

.panel summary::-webkit-details-marker {
  display: none;
}

.panel summary > span:not(.chip) {
  flex: 1;
}

.panel summary .chev {
  transition: transform 0.2s ease;
}

.panel[open] summary .chev {
  transform: rotate(90deg);
}

.panel-body {
  padding: 4px 18px 20px;
  color: var(--muted);
  font-size: 0.9688rem;
}

.panel-body p + * {
  margin-top: 12px;
}

.panel-body ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.panel-body strong,
.panel-body em {
  color: var(--fg);
  font-style: normal;
}

/* QR */

.qr-frame {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 20px;
  line-height: 0;
}

.qr-frame img {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}

.panel-body.center .qr-frame + p {
  margin-top: 14px;
}

.qr-panel {
  text-align: center;
  padding: 28px 24px;
}

.qr-panel .qr-frame {
  margin-top: 18px;
}

.qr-panel .qr-frame img {
  width: 240px;
  height: 240px;
}

.qr-title {
  margin-top: 20px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.qr-panel .muted {
  margin: 8px auto 0;
  max-width: 30ch;
  font-size: 0.9688rem;
}

/* footer */

.footer {
  display: grid;
  gap: 10px;
  padding: 16px 4px 0;
  font-size: 0.875rem;
  color: var(--label);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.footer-note img {
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer a {
  color: var(--label);
  text-underline-offset: 3px;
}

/* ---------- interaction ---------- */

@media (hover: hover) {
  .btn-primary:not(.is-disabled):hover {
    background: color-mix(in srgb, var(--accent) 88%, #fff);
  }
  .btn-outline:not(.is-disabled):hover {
    box-shadow: inset 0 0 0 1px var(--fg);
  }
  .contact-list a:hover,
  .panel summary:hover {
    background: var(--hover);
  }
  .svc-list a:hover .svc-name {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
  .text-link:hover .i {
    transform: translateX(3px);
  }
  .footer a:hover {
    color: var(--fg);
  }
}

/* ---------- larger screens ---------- */

@media (min-width: 560px) {
  .btn-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (min-width: 900px) {
  .layout.has-qr {
    max-width: 1040px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
    gap: 64px;
    padding: 72px 40px;
  }

  .qr-panel {
    position: sticky;
    top: 40px;
    padding: 36px 30px;
  }

  .qr-panel .qr-frame img {
    width: 260px;
    height: 260px;
  }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
