/*
  THE LANGOUSTINES
  A mildly menacing organisation from below.

  Design tokens live in :root. The public site uses a poster-like
  underwater palette; the admin remains clear and practical.
*/

:root {
  color-scheme: light;

  /* Original Langoustines identity */
  --navy: #06004d;
  --pink: #dc015d;

  /* Supporting underwater colours */
  --sea-glass: #b9ddd2;
  --turquoise: #399b91;
  --yellow: #f2d36b;
  --coral-pale: #ffe1d8;

  /* Paper and type */
  --paper: #fff3df;
  --white: #fffdf8;
  --ink: #17133e;
  --muted: #66617d;
  --line: #ddd5e5;

  /* Shape and depth */
  --radius: 8px;
  --radius-large: 24px;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(
      circle at 8% 18%,
      rgb(57 155 145 / 7%) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 92% 42%,
      rgb(220 1 93 / 5%) 0 3px,
      transparent 4px
    ),
    var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--pink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 4px;
}

::selection {
  color: var(--paper);
  background: var(--pink);
}

.wrapper {
  width: min(1100px, calc(100% - 2.5rem));
  margin-inline: auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
}

h1 {
  color: var(--navy);
  font-size: 3rem;
}

h2 {
  color: var(--navy);
  font-size: 2rem;
}

h3 {
  color: var(--navy);
  font-size: 1.55rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--pink);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Public site navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  background: var(--navy);
  color: var(--paper);
  border-bottom: 5px solid var(--pink);
}

.header-inner {
  width: min(1100px, calc(100% - 2.5rem));
  min-height: 8rem;
  padding-block: 0.75rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  width: 12rem;
  flex: 0 0 12rem;
  align-items: center;
}

.brand img {
  display: block;
  width: 100%;
  max-height: 8rem;
  height: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.5rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--navy);
  background: var(--yellow);
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 3rem;
  border: 2px solid var(--pink);
  border-radius: 5px 48px 5px 48px;
  background: var(--navy);
  box-shadow: 9px 9px 0 var(--pink);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -120px;
  right: -90px;
  width: 280px;
  height: 280px;
  border: 2px solid rgb(220 1 93 / 45%);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgb(220 1 93 / 12%), 0 0 0 48px rgb(185 221 210 / 7%);
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -1.5rem;
  bottom: -3rem;
  width: min(52%, 560px);
  aspect-ratio: 2.06;
  background: url("/logo.png") center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

.home-hero .eyebrow {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.home-hero h1 {
  position: relative;
  max-width: 760px;
  margin-bottom: 1.4rem;
  color: var(--paper);
  font-weight: 700;
  line-height: 0.95;
}

.home-hero .hero-copy {
  position: relative;
  max-width: 36rem;
  margin-bottom: 0.75rem;
  color: var(--sea-glass);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.home-hero .hero-copy:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Featured events and event cards
   -------------------------------------------------------------------------- */

.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}

.highlight-column {
  min-width: 0;
}

.highlight-column > .eyebrow {
  margin-left: 0.25rem;
}

.event-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  border: 2px solid var(--navy);
  border-radius: 5px 22px 5px 22px;
  background: var(--white);
  box-shadow: 4px 5px 0 var(--sea-glass);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 7px 9px 0 var(--sea-glass);
}

.event-card-highlight {
  border: 2px solid var(--pink);
  border-radius: 22px 5px 22px 5px;
  background: var(--coral-pale);
  box-shadow: 6px 6px 0 var(--pink);
}

.event-card-highlight:hover {
  box-shadow: 8px 9px 0 var(--pink);
}

.event-card-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.type-label,
.price-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  line-height: 1.45;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.type-label {
  background: var(--navy);
  color: var(--paper);
  text-transform: uppercase;
}

.type-workshop {
  background: var(--turquoise);
  color: var(--white);
}

.price-pill {
  background: var(--yellow);
  color: var(--navy);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.event-card h3 {
  max-width: 100%;
  margin-bottom: 0.65rem;
  overflow-wrap: anywhere;
}

.event-card h3 a {
  color: var(--navy);
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.event-card h3 a:hover {
  color: var(--pink);
  text-decoration-color: currentColor;
}

.event-date {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 800;
}

.event-venue {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.event-excerpt {
  margin: 0.35rem 0 1.1rem;
  color: var(--muted);
  white-space: normal;
}

.card-map {
  margin: -0.1rem 0 0.65rem;
  font-size: 0.86rem;
}

.text-link {
  color: var(--pink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
}

.text-link:hover {
  color: var(--pink);
  text-decoration-color: currentColor;
}

.event-card .text-link {
  margin-top: auto;
  padding-top: 0.4rem;
}

.events-section {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.5rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.event-grid .event-card {
  height: 100%;
}

/* A little variety: like a noticeboard of unrelated maritime incidents. */
.event-grid .event-card:nth-child(3n + 2) {
  background: #e5f1e9;
  border-radius: 22px 5px 22px 5px;
  box-shadow: 4px 5px 0 var(--turquoise);
}

.event-grid .event-card:nth-child(3n + 3) {
  background: var(--coral-pale);
  box-shadow: 4px 5px 0 var(--pink);
}

.empty-state {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 2px dashed var(--turquoise);
  border-radius: 5px 28px 5px 28px;
  background: #e5f1e9;
}

.empty-state h3,
.empty-state h2 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Interior pages and event details
   -------------------------------------------------------------------------- */

.page-main {
  min-height: 60vh;
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.page-intro {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.page-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  color: var(--pink);
}

.event-detail {
  max-width: 850px;
}

.event-detail article {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 2px solid var(--navy);
  border-radius: 5px 30px 5px 30px;
  background: var(--white);
  box-shadow: 7px 7px 0 var(--sea-glass);
}

.detail-heading {
  padding: 0.5rem 0 1.5rem;
  border-bottom: 2px dashed var(--line);
}

.detail-heading h1 {
  margin-top: 0.9rem;
  margin-bottom: 0.8rem;
  font-size: clamp(2.5rem, 6vw, 4.3rem);
}

.detail-date {
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 800;
}

.detail-price {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 850;
}

.booking-row {
  padding: 1.5rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--pink);
  color: white;
  box-shadow: 3px 4px 0 var(--navy);
}

.button-primary:hover {
  background: #bd004f;
  color: white;
  box-shadow: 5px 6px 0 var(--navy);
}

.button-secondary {
  border-color: var(--navy);
  background: var(--paper);
  color: var(--navy);
}

.button-secondary:hover {
  background: var(--yellow);
  color: var(--navy);
}

.detail-block {
  padding: 1.6rem 0;
  border-bottom: 2px dashed var(--line);
}

.detail-block h2 {
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
}

.detail-block p:last-child {
  margin-bottom: 0;
}

.detail-venue {
  color: var(--navy);
  font-weight: 850;
}

.description p {
  margin-bottom: 1rem;
  white-space: normal;
}

.description p:last-child {
  margin-bottom: 0;
}

.detail-footer {
  padding-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--paper);
  border-top: 5px solid var(--pink);
}

.footer-inner {
  width: min(1100px, calc(100% - 2.5rem));
  min-height: 100px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--yellow);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--sea-glass);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Admin: deliberately calmer and more functional than the public site
   -------------------------------------------------------------------------- */

.admin-body {
  background: #f3f0f8;
}

.admin-header {
  background: var(--navy);
  color: white;
  border-bottom: 5px solid var(--pink);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: white;
  font-weight: 850;
  text-decoration: none;
}

.admin-brand:hover {
  color: var(--yellow);
}

.admin-brand img {
  width: 110px;
  height: auto;
}

.admin-main {
  padding-block: 2.5rem 5rem;
}

.admin-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-title-row h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.admin-title-row .eyebrow {
  margin-bottom: 0.4rem;
}

.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-actions p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 14px rgb(6 0 77 / 5%);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  background: #eeeaf5;
  color: var(--navy);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: #fff8f8;
}

.admin-table td strong {
  display: block;
  min-width: 160px;
  color: var(--navy);
}

.table-subtext {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.row-actions {
  white-space: nowrap;
}

.row-actions form {
  display: inline;
  margin-left: 0.75rem;
}

.button-link {
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: var(--pink);
  font-weight: 800;
  cursor: pointer;
}

.button-link:hover {
  text-decoration: underline;
}

.button-link.danger {
  color: #a32641;
}

.status-pill {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-published {
  background: #dcefe5;
  color: #145b43;
}

.status-draft {
  background: #eeeaf5;
  color: #51496b;
}

.event-form {
  max-width: 760px;
}

.form-section {
  margin-bottom: 1.2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: 0 4px 14px rgb(6 0 77 / 5%);
}

.form-section h2 {
  margin-bottom: 0.55rem;
  font-size: 1.4rem;
}

.form-note {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field label {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 850;
}

.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #c7bfd8;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--turquoise);
  outline: 2px solid rgb(57 155 145 / 20%);
  outline-offset: 1px;
}

.form-field textarea {
  resize: vertical;
}

.form-field small {
  color: var(--muted);
  font-size: 0.82rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.form-error,
.form-success {
  max-width: 760px;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-weight: 750;
}

.form-error {
  border: 1px solid #c22c55;
  background: #fff0f4;
  color: #8b1538;
}

.form-success {
  border: 1px solid #a5d7bd;
  background: #edfaf3;
  color: #1c6244;
}

@media (max-width: 800px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner {
    gap: 1.25rem;
    min-height: 104px;
  }

  .main-nav {
    gap: 0.25rem;
  }

  .main-nav a {
    padding-inline: 0.65rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem;
  }
}

@media (max-width: 580px) {
  .wrapper,
  .header-inner,
  .footer-inner {
    width: min(100% - 1.5rem, 1100px);
  }

  .header-inner {
    min-height: auto;
    padding-block: 0.9rem 0.75rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .brand {
    margin: auto;
    flex-basis: auto;
  }

  .main-nav {
    width: 100%;
    justify-content: space-evenly;
    gap: 0.2rem;
  }

  .main-nav a {
    padding: 0.4rem 0.65rem;
    font-size: 0.86rem;
  }

  .home-hero {
    margin-top: 1.25rem;
    padding: 2.5rem 1.5rem;
    border-radius: 5px 30px 5px 30px;
    box-shadow: 5px 5px 0 var(--pink);
  }

  .home-hero::after {
    right: -2rem;
    bottom: -1rem;
    width: 75%;
    opacity: 0.14;
  }

  .home-hero h1 {
    font-size: 2rem;
  }

  .highlights {
    grid-template-columns: 1fr;
    padding-top: 2.75rem;
    padding-bottom: 3.25rem;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    padding: 1.25rem;
  }

  .event-detail article {
    padding: 1.25rem;
  }

  .footer-inner {
    min-height: auto;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding-block: 1.4rem;
  }

  .admin-brand img {
    width: 90px;
  }

  .admin-title-row,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions .button {
    width: 100%;
  }

  .admin-table {
    min-width: 690px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
