/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles background colour */
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(-45deg, #9c89e0, #f48fb1, #6ec6e8, #9c89e0);
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    background-position: 0% 50%;
  }
}

/* Card Styles set for mobile screens */
.card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Card Header Styles */
.card-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  animation: floatAvatar 4s ease-in-out infinite;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .avatar {
    animation: none;
  }
}

.name {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.title {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.contact-info a {
  color: #333;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Card Actions Styles using flexbox */
.actions {
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.button {
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.button--main {
  background: linear-gradient(135deg, #9c89e0, #f48fb1);
  color: #fff;
}

.button--main:hover {
  background: linear-gradient(135deg, #8370c9, #d97a9a);
}

.button--secondary {
  background: #fff;
  color: #9c89e0;
  border: 1px solid #e3dbf7;
  box-shadow: 0 2px 8px rgba(156, 137, 224, 0.15);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.button--secondary:hover {
  background: #9c89e0;
  color: #fff;
  box-shadow: 0 4px 12px rgba(156, 137, 224, 0.3);
}

/* Links Section Styles */
.links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
}

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
}

.link-row:last-child {
  border-bottom: none;
}

.link-row .arrow {
  color: #aaa;
}

.link-row:hover {
  color: #9c89e0;
}

.link-row:hover .arrow {
  color: #9c89e0;
}

.cta {
  padding: 0.5rem 1.5rem 1.5rem;
}

.card-footer {
  text-align: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  font-size: 0.8rem;
  color: #999;
}

/* Save Message Styles */
.save-message {
  text-align: center;
  font-size: 0.8rem;
  color: #2e7d32;
  padding: 0 1.5rem;
  min-height: 1rem;
}


/* Modal popup Styles */
.hidden {
  display: none;
}

.modal-overlay.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 340px;
  position: relative;
}

.modal h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1rem;
  color: #999;
  cursor: pointer;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.modal input,
.modal textarea {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.modal textarea {
  resize: vertical;
  min-height: 60px;
}

.success-message {
  text-align: center;
  color: #2e7d32;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer link styles */
.card-footer a {
  color: inherit;
  text-decoration: none;
}

.card-footer a:hover {
  text-decoration: underline;
}

.link-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.link-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Lighthouse logo icon: the logo is a line drawing (not a filled shape),
   and wider than it is tall, so it gets its own size and a lavender line.
   A little bigger than the other icons so the lighthouse is easy to spot. */
.link-icon--lighthouse {
  width: 32px;
  height: 22px;
  fill: none;
  stroke: #8B6FC0;        /* Lighthouse lavender */
  stroke-width: 9;        /* thicker than the full-size logo, so it doesn't vanish when small */
  stroke-linecap: round;
  stroke-linejoin: round;
  margin: -2px -7px;      /* 14px wider and 4px taller than the other icons, so it borrows the space back: its text lines up and the row stays the same height */
}

/* Emoji icon (e.g. the Monica's Web spider web): same 18px space as the SVG icons,
   with the emoji centred in it, so its text lines up with the other links */
.link-icon--emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
/* Services icon: my "m|" favicon as a small picture.
   A little rounding softens its square edges so it sits nicely beside the line icons. */
.link-icon--favicon {
  border-radius: 3px;
  object-fit: cover;
}

/* Privacy policy page: readable text inside the same card */
.policy {
  padding: 1.5rem;
  color: #333;
  font-size: 0.9rem;
  line-height: 1.6;
}

.policy h1 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.policy h2 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
}

.policy p,
.policy ul {
  margin-bottom: 0.6rem;
}

.policy ul {
  padding-left: 1.2rem;
}

.policy a {
  color: #7b5fc7;
}

.policy-updated {
  font-size: 0.8rem;
  color: #999;
}

.policy-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.policy-back--bottom {
  margin: 1rem 0 0;
}

/* Stop the card stretching to fill the whole screen height.
   Without this, a short page (like links.html) gets a big empty white area at the bottom. */
.card {
  align-self: flex-start;
}

/* ===== Links page extras =====
   Everything below starts with .links-page, so it ONLY affects links.html.
   Your main card stays exactly as it is. */

/* 1. Gradient ring around your photo, using the same colours as the background */
.links-page .avatar {
  width: 84px;
  height: 84px;
  padding: 3px;                      /* the gap the ring shows through */
  background: linear-gradient(135deg, #9c89e0, #f48fb1, #6ec6e8);
}

/* 2. Each link becomes its own soft "pill" button instead of a plain row */
.links-page .links {
  gap: 0.6rem;                        /* space between the pills */
  padding-top: 1rem;
}

.links-page .link-row {
  padding: 0.85rem 1rem;
  border: 1px solid #ece6fb;
  border-radius: 999px;               /* a huge radius = fully rounded ends */
  background: #faf8ff;                /* very pale lavender */
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;

  /* fade up when the page opens (see 3.) */
  opacity: 0;
  animation: linkFadeUp 0.5s ease forwards;
}

.links-page .link-row:last-child {
  border-bottom: 1px solid #ece6fb;   /* the main card hides the last line; we want it back here */
}

/* Hover: the pill lifts slightly and the arrow nudges right */
.links-page .link-row:hover {
  transform: translateY(-2px);
  border-color: #9c89e0;
  box-shadow: 0 4px 12px rgba(156, 137, 224, 0.25);
}

.links-page .link-row .arrow {
  transition: transform 0.2s ease;
}

.links-page .link-row:hover .arrow {
  transform: translateX(4px);
}

/* 3. Staggered entrance: each pill starts a little later than the one above,
   so they appear one after another like a cascade */
.links-page .link-row:nth-child(1) { animation-delay: 0.05s; }
.links-page .link-row:nth-child(2) { animation-delay: 0.12s; }
.links-page .link-row:nth-child(3) { animation-delay: 0.19s; }
.links-page .link-row:nth-child(4) { animation-delay: 0.26s; }
.links-page .link-row:nth-child(5) { animation-delay: 0.33s; }
.links-page .link-row:nth-child(6) { animation-delay: 0.40s; }
.links-page .link-row:nth-child(7) { animation-delay: 0.47s; }
.links-page .link-row:nth-child(8) { animation-delay: 0.54s; }

@keyframes linkFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Featured pill (Book a Discovery Call): gradient fill and white text so it stands out */
.links-page .link-row--featured {
  background: linear-gradient(135deg, #9c89e0, #f48fb1);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

/* Keep the text and arrow white, even on hover
   (the normal pills turn lavender on hover, which would vanish on the gradient) */
.links-page .link-row--featured:hover,
.links-page .link-row--featured .arrow,
.links-page .link-row--featured:hover .arrow {
  color: #ffffff;
}

.links-page .link-row--featured:hover {
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(244, 143, 177, 0.35);
}

/* Respect people who've asked their phone for less motion */
@media (prefers-reduced-motion: reduce) {
  .links-page .link-row {
    opacity: 1;
    animation: none;
  }
}