:root {
  --ink: #141414;
  --paper: #f7f1e5;
  --paper-deep: #efe5d4;
  --cream: #fffdf7;
  --lime: #e6ff24;
  --orange: #ff5a36;
  --blue: #2946d3;
  --muted: #625f58;
  --line: rgba(20, 20, 20, 0.18);
  --radius: 24px;
  --shadow: 0 22px 70px rgba(49, 39, 25, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(230, 255, 36, 0.16), transparent 29rem),
    radial-gradient(circle at 92% 4%, rgba(41, 70, 211, 0.09), transparent 30rem),
    var(--paper);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px clamp(20px, 5vw, 72px);
  background: rgba(247, 241, 229, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.04em;
  transition: transform 170ms ease, box-shadow 170ms ease;
}
.brand:hover { transform: rotate(-8deg) scale(1.06); box-shadow: 0 6px 0 var(--ink); }

nav { display: flex; gap: clamp(16px, 3vw, 36px); }
nav a {
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.section-pad { padding: clamp(72px, 9vw, 124px) clamp(20px, 7vw, 100px); }

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: clamp(42px, 6vw, 92px);
  padding-top: clamp(22px, 3.5vw, 48px);
  padding-bottom: clamp(62px, 8vw, 104px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.92;
}
h1 { font-size: clamp(4.7rem, 9.5vw, 9.1rem); margin-bottom: 28px; }
h1 span { color: var(--blue); }
h2 { font-size: clamp(3.3rem, 6.7vw, 6.5rem); margin-bottom: 24px; }
h3 { font-size: 1.35rem; line-height: 1.15; }

.hero-copy {
  transform: translateY(-18px);
}

.event-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: -8px 0 24px;
  padding: 12px 17px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 7px 0 var(--ink);
  font-size: clamp(0.86rem, 1.3vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
  animation: event-flash 1.5s ease-in-out infinite;
}
.event-banner:hover { animation-play-state: paused; transform: translateY(-2px) rotate(-1deg); }

.galway-landmarks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 17px;
  color: var(--ink);
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.115em;
  line-height: 1.45;
  text-transform: uppercase;
}
.event-banner-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}
@keyframes event-flash {
  0%, 100% { background: var(--lime); color: var(--ink); box-shadow: 0 7px 0 var(--ink), 0 0 0 rgba(230,255,36,0); }
  50% { background: var(--orange); color: white; box-shadow: 0 7px 0 var(--ink), 0 0 26px rgba(255,90,54,0.42); }
}

.hero-intro {
  max-width: 660px;
  font-size: clamp(1.08rem, 1.65vw, 1.34rem);
  color: var(--muted);
}
.hero-intro strong { color: var(--blue); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.button:disabled { cursor: wait; opacity: 0.7; transform: none; box-shadow: none; }
.button.primary { background: var(--lime); }
.button.ghost.light { border-color: white; color: white; }
.button.ghost.light:hover { box-shadow: 0 8px 0 white; }
.button.ghost.dark { border-color: var(--ink); color: var(--ink); }

.hero-visual {
  position: relative;
  width: min(100%, 650px);
  justify-self: end;
  padding: 0 0 26px 28px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 24px 18px 0 0;
  border: 2px solid var(--ink);
  border-radius: 44px;
  background: var(--lime);
  transform: rotate(-3deg);
}
.hero-photo-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 44px;
  background: #d8d0c3;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.rating-badge {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  min-width: 225px;
  padding: 18px 22px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--ink);
  color: white;
  transform: rotate(-4deg);
  box-shadow: var(--shadow);
}
.rating-badge span { color: var(--lime); letter-spacing: 0.12em; font-size: 1.15rem; }
.rating-badge strong { font-size: 0.94rem; text-transform: uppercase; }
.rating-badge small { color: rgba(255,255,255,0.72); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; }

.ticker {
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: white;
}
.ticker-track {
  width: max-content;
  display: flex;
  gap: 48px;
  padding: 15px 0;
  animation: marquee 34s linear infinite;
}
.ticker span {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.65rem;
  letter-spacing: 0.04em;
}
.ticker span::after { content: "\2726"; margin-left: 48px; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

.section-heading { max-width: 960px; margin-bottom: 52px; }
.split-heading { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.section-note { max-width: 445px; color: var(--muted); }

.about {
  background: linear-gradient(180deg, rgba(255,253,247,0.45), rgba(247,241,229,0));
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-top: 20px;
}
.info-card {
  position: relative;
  min-height: 405px;
  padding: 34px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-shadow: 0 8px 0 rgba(20,20,20,0.08);
  transform: translateY(0);
  transition: transform 230ms cubic-bezier(0.2, 0.85, 0.2, 1.15), box-shadow 230ms ease, border-color 230ms ease, background 230ms ease;
  will-change: transform;
}
.info-card::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 0;
  height: 8px;
  border-radius: 0 0 999px 999px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 230ms ease;
}
.info-card.featured {
  background: var(--orange);
  color: white;
  transform: translateY(-22px) rotate(-1deg);
  box-shadow: 0 12px 0 rgba(20,20,20,0.12);
}
.info-card.featured::before { background: var(--lime); }
.info-card:hover {
  transform: translateY(-18px);
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 22px 0 rgba(41,70,211,0.18), 0 30px 60px rgba(49,39,25,0.15);
}
.info-card.featured:hover {
  transform: translateY(-40px) rotate(-1deg);
  border-color: var(--ink);
  background: var(--orange);
  box-shadow: 0 24px 0 var(--lime), 0 36px 70px rgba(49,39,25,0.2);
}
.info-card:hover::before { transform: scaleX(1); }
.card-number {
  position: absolute;
  top: 24px;
  right: 26px;
  color: var(--blue);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 3.4rem;
  line-height: 1;
  opacity: 0.42;
  transition: transform 230ms cubic-bezier(0.2, 0.9, 0.2, 1.35), opacity 230ms ease, color 230ms ease;
}
.info-card.featured .card-number { color: white; }
.info-card:hover .card-number {
  transform: translateY(-18px) rotate(-6deg) scale(1.16);
  color: var(--blue);
  opacity: 1;
}
.info-card.featured:hover .card-number { color: var(--lime); }
.info-card p { margin-bottom: 0; }


.good-works {
  background:
    linear-gradient(135deg, rgba(41,70,211,0.07), transparent 38%),
    var(--cream);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.good-works .section-note { color: var(--muted); }
.good-works-intro {
  max-width: 980px;
  margin: -10px 0 40px;
  color: #3f3c36;
  font-size: clamp(1.02rem, 1.6vw, 1.24rem);
  line-height: 1.65;
}
.good-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.good-work-card {
  position: relative;
  min-height: 265px;
  padding: 28px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 0 rgba(20,20,20,0.08);
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}
.good-work-card:hover {
  transform: translateY(-8px);
  background: white;
  box-shadow: 0 12px 0 var(--blue), 0 24px 45px rgba(49,39,25,0.12);
}
.good-work-card .country {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.good-work-card h3 { margin-bottom: 13px; }
.good-work-card p { margin-bottom: 0; color: var(--muted); }

.gallery {
  background: var(--ink);
  color: white;
}
.gallery .eyebrow { color: var(--lime); }
.gallery .section-note { color: rgba(255,255,255,0.68); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.photo-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  background: #242424;
  box-shadow: 0 16px 45px rgba(0,0,0,0.23);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.photo-card:hover {
  transform: translateY(-7px);
  border-color: var(--lime);
  box-shadow: 0 14px 0 var(--lime), 0 28px 55px rgba(0,0,0,0.35);
}
.photo-link {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #333;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease, filter 350ms ease;
}
.photo-card:hover img { transform: scale(1.05); filter: saturate(1.08) contrast(1.02); }
.photo-card figcaption {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 17px;
  border-top: 1px solid rgba(255,255,255,0.16);
  color: white;
  background: #242424;
  font-size: 0.9rem;
  font-weight: 800;
}

.portraits {
  background:
    radial-gradient(circle at 15% 15%, rgba(255,90,54,0.07), transparent 24rem),
    var(--paper-deep);
}
.portrait-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.portrait-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: var(--cream);
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.portrait-card:nth-child(even) { transform: translateY(18px); }
.portrait-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 14px 0 var(--ink); }
.portrait-card:nth-child(even):hover { transform: translateY(4px) rotate(1deg); }
.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
}
.portrait-card span { display: grid; gap: 4px; padding: 16px; }
.portrait-card strong { font-size: 0.94rem; }
.portrait-card small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }

.reviews { background: #eee5d7; }
.review-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 2px solid var(--ink);
}
.score { display: flex; align-items: baseline; gap: 8px; }
.score strong { font-family: "Bebas Neue", Impact, sans-serif; font-size: 4.5rem; line-height: 1; }
.score span { color: var(--muted); }
.stars { color: var(--orange); letter-spacing: 0.15em; }
.review-summary p { margin: 4px 0 0; color: var(--muted); }
.review-location-note {
  margin: 0 0 28px;
  padding: 12px 16px;
  border-left: 5px solid var(--blue);
  background: rgba(255,255,255,0.52);
  color: var(--muted);
  font-size: 0.9rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.review-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
}
.review-card:nth-child(3n+2) { transform: rotate(1deg); }
.review-card:nth-child(3n+3) { transform: rotate(-1deg); }
.review-stars { color: var(--orange); letter-spacing: 0.12em; }
.review-card blockquote { margin: 30px 0; font-size: 1.12rem; font-weight: 600; }
.review-card footer { margin-top: auto; padding: 0; background: transparent; color: var(--ink); }
.review-card footer strong, .review-card footer span { display: block; }
.review-card footer span { color: var(--muted); font-size: 0.86rem; }

.closing {
  text-align: center;
  background: var(--blue);
  color: white;
}
.closing .eyebrow { color: var(--lime); }
.closing p:not(.eyebrow) { max-width: 680px; margin-left: auto; margin-right: auto; color: rgba(255,255,255,0.78); }
.closing .button { margin-top: 20px; }

body > footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 7vw, 100px);
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
}
body > footer p { margin: 0; }

dialog {
  width: min(650px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 30px 100px rgba(0,0,0,0.35);
}
dialog::backdrop { background: rgba(20,20,20,0.72); backdrop-filter: blur(4px); }
.dialog-shell { padding: clamp(24px, 5vw, 42px); }
.dialog-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dialog-header h2 { font-size: 4rem; margin-bottom: 20px; }
.icon-button {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}
label, legend { font-weight: 700; font-size: 0.9rem; }
input, textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px 15px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(41,70,211,0.18); }
textarea { min-height: 120px; resize: vertical; }
.dialog-shell > label, fieldset { display: block; margin: 18px 0; }
fieldset { padding: 0; border: 0; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; margin-top: 4px; }
.rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.rating-input label { color: #c9c4ba; font-size: 2rem; cursor: pointer; }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--orange); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
small { display: block; margin-top: 6px; color: var(--muted); text-align: right; }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: 0.78rem; }
.form-status { min-height: 1.2em; margin: 8px 0 0; color: var(--blue); font-size: 0.82rem; font-weight: 700; }
.noscript { margin: 0; padding: 12px 20px; background: #fff1b8; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 0.9fr; gap: 44px; }
  .portrait-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portrait-card:nth-child(even) { transform: none; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { transform: none; }
  .good-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-visual { width: min(100%, 620px); justify-self: center; }
  .about-grid, .reviews-grid { grid-template-columns: 1fr; }
  .info-card { min-height: 320px; }
  .info-card.featured { transform: none; }
  .info-card.featured:hover { transform: translateY(-18px); }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  nav { display: none; }
  .site-header { justify-content: center; }
  .hero { padding-top: 50px; }
  h1 { font-size: clamp(4.2rem, 21vw, 6.4rem); }
  h2 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .hero-visual { padding-left: 12px; }
  .hero-visual::before { inset: 18px 10px 0 0; border-radius: 30px; }
  .hero-photo-frame { border-radius: 30px; }
  .rating-badge { left: 0; bottom: 0; min-width: 205px; }
  .photo-grid { grid-template-columns: 1fr; }
  .good-works-grid { grid-template-columns: 1fr; }
  .event-banner { border-radius: 18px; line-height: 1.25; text-align: center; }
  .photo-link { aspect-ratio: 4 / 3; }
  .portrait-grid { grid-template-columns: 1fr 1fr; }
  .review-summary { align-items: flex-start; flex-direction: column; }
  body > footer { flex-direction: column; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}

@media (max-width: 430px) {
  .portrait-grid { grid-template-columns: 1fr; }
  .portrait-card:nth-child(even) { transform: none; }
  .section-pad { padding-left: 18px; padding-right: 18px; }
  .rating-badge { position: relative; left: auto; bottom: auto; margin: -32px 18px 0; transform: rotate(-2deg); }
  .hero-visual { padding-bottom: 0; }
}


/* v4 photo placement refinements */
.photo-card img { object-position: center 28%; }
.photo-card:nth-child(2) img { object-position: center 48%; }
.photo-card:nth-child(3) img { object-position: center 30%; }
.photo-card:nth-child(4) img { object-position: center 40%; }
.photo-card:nth-child(5) img { object-position: center 18%; }
.photo-card:nth-child(6) img { object-position: center 28%; }
.photo-card:nth-child(7) img { object-position: center 30%; }
.photo-card:nth-child(8) img { object-position: center 25%; }
.photo-card:nth-child(9) img { object-position: center 48%; }
.portrait-card:nth-child(2) img { object-position: center 35%; }
.portrait-card:nth-child(3) img { object-position: center 28%; }
.portrait-card:nth-child(4) img { object-position: center 42%; }
.portrait-card:nth-child(5) img { object-position: center 28%; }

/* Shared review service state */
.review-location-note[data-state="ready"] {
  border-left-color: #2d8a57;
  background: rgba(218, 248, 228, 0.72);
  color: #245d3d;
}

.review-location-note[data-state="unavailable"] {
  border-left-color: var(--orange);
  background: rgba(255, 236, 218, 0.78);
  color: #7a3d24;
}

.button[aria-disabled="true"],
.button:disabled {
  cursor: not-allowed;
}
.review-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#review-success-sound { display: none; }

@media (max-width: 640px) {
  .galway-landmarks { justify-content: center; text-align: center; }
}
