/* ---------- Design tokens ---------- */
:root {
  --brand-900: #0c2f36;
  --brand-800: #12454f;
  --brand-700: #175a67;
  --brand-600: #1d7081;
  --brand-400: #47adc2;
  --brand-200: #b5dbe3;
  --cream: #fbf8f1;
  --cream-dim: #f2ece0;
  --bg: #E6EFAC;
  --ink: #16262b;
  --ink-soft: #566d72;
  --ring: rgba(71, 173, 194, 0.55);
  --shadow-sm: 0 1px 2px rgba(12, 47, 54, 0.07);
  --shadow-md: 0 6px 18px rgba(12, 47, 54, 0.12);
  --shadow-lg: 0 18px 44px rgba(74, 88, 34, 0.18);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px) 16px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft dappled-light wash behind the card */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 380px at 18% 14%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(440px 360px at 84% 78%, rgba(150, 183, 92, 0.20), transparent 72%);
  z-index: 0;
}

/* ---------- Card ---------- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  background: var(--cream);
  border-radius: 26px;
  padding: clamp(22px, 5vw, 38px) clamp(18px, 5vw, 34px) clamp(20px, 4vw, 28px);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(90, 105, 45, 0.14);
}

/* ---------- Header ---------- */
.header { text-align: center; }

.avatar {
  width: clamp(104px, 28vw, 140px);
  height: clamp(104px, 28vw, 140px);
  margin: 0 auto 13px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand-200), var(--cream-dim));
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 6px var(--brand-700), var(--shadow-md);
  display: grid;
  place-items: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar__leaf { display: none; width: 62%; height: 62%; }
.avatar--fallback .avatar__leaf { display: block; }

.title {
  margin: 0;
  font-family: "Oswald", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 6.4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--brand-900);
}

.handle {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-600);
}

/* Styled as a pill so it reads as a tappable control -- it replaces the old
   "Get in Touch" link button, which used to carry that affordance. */
.email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(23, 90, 103, 0.18);
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--brand-700);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.email__icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.email:hover,
.email:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 90, 103, 0.42);
  color: var(--brand-600);
}

.email:active { transform: translateY(0); }

.email:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* ---------- Social icons ---------- */
.socials {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
}

.social {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social svg { width: 19px; height: 19px; }

.social--tiktok { background: linear-gradient(150deg, #2b2b2b, #000); }
.social--instagram { background: linear-gradient(150deg, #fdc468 0%, #e1306c 45%, #833ab4 100%); }

.social:hover,
.social:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social:active { transform: translateY(0); }

.social:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* ---------- TikTok in-app browser hint ---------- */
.hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  max-width: 380px;
  margin: 14px auto 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(71, 173, 194, 0.14);
  border: 1px solid rgba(23, 90, 103, 0.22);
}

/* display:flex would otherwise defeat the hidden attribute */
.hint[hidden] { display: none; }

.hint__icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  color: var(--brand-700);
}

.hint__text {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.42;
  color: var(--brand-900);
}

/* TikTok shows the hint and its webview has less room, so tighten the header. */
.is-tiktok .avatar {
  width: clamp(84px, 22vw, 108px);
  height: clamp(84px, 22vw, 108px);
  margin-bottom: 10px;
}

.is-tiktok .hint { margin-top: 11px; }

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  margin: clamp(16px, 3vw, 26px) auto 0;
}

.link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(23, 90, 103, 0.13);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 90, 103, 0.42);
}

.link:active { transform: translateY(0); }

.link:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.link__icon {
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
}

.link__icon svg { width: 17px; height: 17px; }
.link__icon img { width: 21px; height: 21px; display: block; }

.link--plantaddicts .link__icon { background: linear-gradient(150deg, #fde6f0, #f7c8dd); }
.link--amazon .link__icon { background: linear-gradient(150deg, #f5a623, #e07b12); }
.link--venmo .link__icon { background: linear-gradient(150deg, #3d95ce, #008cff); }

.link__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link__text strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.link__text small {
  font-size: 0.73rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.link__arrow {
  flex: 0 0 auto;
  color: #7b9399;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, color 0.18s ease;
}

.link__arrow svg { width: 18px; height: 18px; }

.link:hover .link__arrow,
.link:focus-visible .link__arrow {
  transform: translateX(3px);
  color: var(--brand-600);
}

/* ---------- Shop grid ---------- */
.shop {
  margin-top: clamp(18px, 4vw, 30px);
  padding-top: clamp(16px, 3vw, 24px);
  border-top: 1px solid rgba(23, 90, 103, 0.13);
}

.shop__heading {
  margin: 0 0 12px;
  text-align: center;
  font-family: "Oswald", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  color: var(--brand-900);
}

.shop__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.product {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(23, 90, 103, 0.13);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Tiles are garden photography rather than cut-outs on white, so they are
   cropped to fill the square instead of letterboxed inside it. */
.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product:hover,
.product:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 90, 103, 0.42);
}

.product:active { transform: translateY(0); }

.product:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

/* Styling for the optional Amazon Associates disclosure; see README. */
.shop__note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.shop__more {
  margin: 13px 0 0;
  text-align: center;
  font-size: 0.79rem;
}

.shop__more a {
  color: var(--brand-700);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 90, 103, 0.3);
  padding-bottom: 1px;
}

.shop__more a:hover,
.shop__more a:focus-visible {
  color: var(--brand-600);
  border-bottom-color: var(--brand-600);
}

/* ---------- Plant Addicts favorites page ---------- */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
}

.backlink svg { width: 15px; height: 15px; }

.backlink:hover,
.backlink:focus-visible { color: var(--brand-600); }

.pa-mark {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
}

.picks {
  list-style: none;
  margin: clamp(18px, 4vw, 26px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pick {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(23, 90, 103, 0.13);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.pick:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 90, 103, 0.3);
}

/* Decorative twin of the CTA below it -- kept out of the tab order so keyboard
   and screen-reader users get one link per plant rather than two. */
.pick__media { display: block; }

/* height:auto is required -- the img height attribute is a presentational hint
   that would otherwise beat aspect-ratio and render the photo uncropped. */
.pick__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.pick__body { padding: 14px clamp(14px, 3.5vw, 18px) clamp(15px, 3.5vw, 18px); }

.pick__name {
  margin: 0;
  font-family: "Oswald", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--brand-900);
}

.pick__zone {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(71, 173, 194, 0.16);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--brand-800);
}

.pick__note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.58;
  color: var(--ink-soft);
}

.pick__specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 11px 0 0;
  padding: 0;
}

.pick__specs li {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(71, 173, 194, 0.14);
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--brand-800);
}

.pick__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding: 9px 15px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--brand-600), var(--brand-700));
  color: #fff;
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pick__cta svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.pick__cta:hover,
.pick__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pick__cta:hover svg,
.pick__cta:focus-visible svg { transform: translateX(3px); }

.pick__cta:active { transform: translateY(0); }

.pick__cta:focus-visible,
.pick__media:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.pa-disclosure {
  margin: clamp(18px, 4vw, 24px) 0 0;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(24px, 5vw, 32px);
  padding-top: 18px;
  border-top: 1px solid rgba(23, 90, 103, 0.13);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ---------- Small phones ---------- */
/* Squeeze the header and tiles so the shop grid starts above the fold. */
@media (max-width: 380px) {
  .card { padding-top: 18px; }
  .avatar { width: 86px; height: 86px; margin-bottom: 9px; }
  .title { font-size: 1.58rem; }
  .email { font-size: 0.75rem; padding: 6px 12px; }
  .socials { gap: 9px; margin-top: 10px; }
  .social { width: 34px; height: 34px; }
  .social svg { width: 17px; height: 17px; }
  .hint { margin-top: 11px; padding: 9px 11px; }
  .hint__text { font-size: 0.73rem; }
  .links { gap: 7px; margin-top: 12px; }
  .link { padding: 8px 11px; gap: 10px; }
  .link__icon { width: 30px; height: 30px; }
  .link__icon svg { width: 16px; height: 16px; }
  .link__icon img { width: 19px; height: 19px; }
  .link__text strong { font-size: 0.85rem; }
  .link__text small { font-size: 0.71rem; }
  .shop { margin-top: 14px; padding-top: 12px; }
  .shop__heading { font-size: 1.2rem; margin-bottom: 10px; }
  .pa-mark { width: 46px; height: 46px; }
  .picks { gap: 13px; }
  .pick__name { font-size: 1.11rem; }
}

/* ---------- Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  .link { border-color: rgba(23, 90, 103, 0.45); }
  .link__text small { color: #3c4d51; }
}
