/* Irish Marie Magbitang — cream, gold and leaf-green real estate card */
:root {
  --void: #f0e4d2;
  --card: #fbf6ef;
  --ink: #4a2c17;
  --muted: #7a5c40;
  --ivory: #fbf6ef;
  --ivory-deep: #f3eadc;
  --cream: #f7f1e8;
  --gold: #c8893a;
  --gold-deep: #a8692a;
  --gold-line: #d4a45a;
  --bronze: #c8893a;
  --bronze-deep: #a8692a;
  --bronze-dark: #6b3e16;
  --leaf: #3e6b32;
  --leaf-soft: #5c7f4a;
  --navy: #4a2c17;
  --blue: #c8893a;
  --blue-core: #c8893a;
  --blue-deep: #a8692a;
  --blue-rgb: 200, 137, 58;
  --blue-bright-rgb: 212, 164, 90;
  --save-top: #c8893a;
  --save-press: #6b3e16;
  --line: rgba(168, 105, 42, 0.22);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #ead9c3;
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

.ambiance {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 241, 232, 0.62) 0%, rgba(247, 241, 232, 0.36) 48%, rgba(168, 105, 42, 0.16) 100%),
    #ead9c3 url("../images/atmosphere.jpg") 50% 20% / cover no-repeat;
  filter: saturate(1.04);
}

.ambiance::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
  mix-blend-mode: overlay;
}

.card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 24px));
  margin: 16px auto 28px;
  padding: 0 0 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf9 0%, #fbf6ef 42%, #f3eadc 100%);
  border: 1px solid rgba(200, 137, 58, 0.38);
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(74, 44, 23, 0.18),
    0 0 0 1px rgba(74, 44, 23, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.identity,
.actions,
.qr-block,
.card-foot {
  padding-left: 24px;
  padding-right: 24px;
}

.hero {
  position: relative;
  z-index: 0;
  line-height: 0;
  background: #f6ebdd;
}

.banner {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

.identity {
  position: relative;
  z-index: 2;
  padding-top: 0;
  text-align: center;
}

.portrait-wrap {
  width: 116px;
  height: 116px;
  margin: -12px auto 16px;
  position: relative;
  z-index: 3;
  isolation: isolate;
  filter: drop-shadow(0 8px 18px rgba(74, 44, 23, 0.22));
}

.ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  transform: rotate(-90deg);
  overflow: visible;
}

.ring circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  animation: ringDraw 1s var(--ease) 0.3s forwards;
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  background: var(--cream);
  border: 3px solid #fffdf9;
  box-shadow: 0 0 0 1px rgba(200, 137, 58, 0.7);
  display: block;
  animation: portraitIn 0.7s var(--ease) 0.15s backwards;
}

h1 {
  margin: 0;
  padding: 0.08em 0 0.2em;
  overflow: visible;
  font-family: "Plus Jakarta Sans", Outfit, "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.title {
  margin: 2px 0 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--gold-deep);
}

.title::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.chips li {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--ink);
  border: 1px solid rgba(200, 137, 58, 0.4);
  background: rgba(255, 252, 247, 0.92);
  border-radius: 999px;
  padding: 7px 12px;
}

.bio {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  color: #5c4330;
}

.actions { padding-top: 24px; }

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-link {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.82);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.contact-link > svg:first-child {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8eedf 0%, #ecd9bb 100%);
  color: var(--gold-deep);
  box-shadow: inset 0 0 0 1px rgba(200, 137, 58, 0.3);
}

.contact-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 2px;
}

.contact-label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.contact-value {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.contact-link .contact-go {
  flex-shrink: 0;
  color: #b08960;
}

.contact-link:active { background: rgba(200, 137, 58, 0.12); }

.contact-link:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font: 600 15px/1.2 Outfit, "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0 16px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-save {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(180deg, var(--save-top) 0%, var(--gold-deep) 100%);
  color: #fffdf9;
  border-color: rgba(212, 164, 90, 0.55);
  box-shadow:
    0 10px 28px rgba(168, 105, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(200, 137, 58, 0.28);
  transform: scale(1);
  animation: ripple 500ms ease-out forwards;
  pointer-events: none;
}

.btn-save .ripple { background: rgba(255, 255, 255, 0.35); }

@media (hover: hover) {
  .contact-link:hover {
    background: #fffdf9;
    border-color: rgba(200, 137, 58, 0.5);
    box-shadow: 0 8px 22px rgba(74, 44, 23, 0.08);
  }

  .contact-link:hover .contact-label { color: var(--bronze-dark); }
  .contact-link:hover > svg:first-child {
    color: #fffdf9;
    background: var(--gold-deep);
  }

  .btn-save:hover {
    filter: brightness(1.08);
    box-shadow:
      0 14px 32px rgba(168, 105, 42, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }
}

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

.btn.is-opening {
  background: linear-gradient(180deg, var(--gold-deep) 0%, var(--save-press) 100%);
}

.qr-block {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 24px 20px 20px;
  text-align: center;
  border: 1px solid rgba(200, 137, 58, 0.3);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.65);
}

.qr-frame {
  display: inline-block;
  padding: 18px;
  line-height: 0;
  background: #f7f1e8;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(200, 137, 58, 0.22);
}

.qr-block canvas {
  display: block;
  width: 168px;
  height: 168px;
  background: #f7f1e8;
}

.qr-block p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.qr-block.is-visible::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  height: 1px;
  background: var(--gold-line);
  top: 16%;
  animation: scan 0.9s ease 0.1s 1 forwards;
  pointer-events: none;
}

.card-foot { padding-top: 20px; padding-bottom: 24px; text-align: center; }

.card-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rise { animation: fadeUp 0.7s var(--ease) backwards; }
.d1 { animation-delay: 0.02s; }
.d2 { animation-delay: 0.08s; }
.d3 { animation-delay: 0.14s; }
.d4 { animation-delay: 0.2s; }
.d5 { animation-delay: 0.26s; }
.d6 { animation-delay: 0.32s; }
.d7 { animation-delay: 0.38s; }
.d8 { animation-delay: 0.44s; }

@media (min-width: 520px) {
  body { padding: 36px 16px 48px; }
}

@media (max-width: 360px) {
  h1 { font-size: 26px; }
  .portrait-wrap { margin-top: -10px; }
  .card { width: min(420px, calc(100% - 16px)); margin: 12px auto 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  html.js .qr-block:not(.is-visible) {
    opacity: 0;
    transform: translateY(12px);
  }

  html.js .qr-block.is-visible {
    animation: fadeUp 0.7s var(--ease) forwards;
  }
}

@keyframes portraitIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes ringDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes ripple {
  to { transform: scale(18); opacity: 0; }
}

@keyframes scan {
  from { top: 18%; opacity: 1; }
  to { top: 78%; opacity: 0; }
}

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

  .rise,
  .portrait,
  .banner,
  html.js .qr-block {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .ring circle { stroke-dashoffset: 0 !important; }
  .qr-block.is-visible::after { display: none !important; }
}
