/* Carrot Sun — Official Global Portal */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
}
/* Metric-matched fallback so the serif headings barely shift when the web font arrives */
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia");
  size-adjust: 84%;
  ascent-override: 110%;
  descent-override: 34%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --cream-50: #fffbf5;
  --cream-100: #fff6ea;
  --cream-200: #f9eddc;
  --sand-300: #f4dfc3;
  --sand-400: #eac9a0;

  --ink: #1f1612;
  --ink-soft: #4a3a30;

  --orange: #f15a22;        /* brand orange — decorative use */
  --orange-cta: #cf4307;    /* 4.7:1 with white text */
  --orange-cta-hover: #b03905;
  --orange-text: #c24008;   /* 5:1 on cream */
  --hairline: rgba(194, 64, 8, 0.2);

  --shadow-card: 0 1px 2px rgba(122, 62, 20, 0.06), 0 14px 34px -10px rgba(122, 62, 20, 0.24);
  --shadow-card-hover: 0 2px 4px rgba(122, 62, 20, 0.08), 0 26px 48px -12px rgba(122, 62, 20, 0.34);
  --radius-card: 1.25rem;

  --font-serif: "Cormorant Garamond", "Cormorant Fallback", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 2.4vw, 2.25rem);
  --page: 94rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream-100) linear-gradient(180deg, #fff2e1 0, #fff8ee 20rem, #fdf1e1 38rem, var(--sand-300) 74%, var(--sand-400) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fine sand grain over the lower half of the page */
body::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .52 0 0 0 0 .33 0 0 0 0 .14 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
  mask-image: linear-gradient(180deg, transparent, #000 70%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-250%);
}
.skip-link:focus {
  transform: none;
}

/* ---------- Backdrop ---------- */
.backdrop {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: clamp(24rem, 46vw, 43rem);
  overflow: hidden;
  pointer-events: none;
}

/* Low sun glowing over the coast */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 30rem 21rem at 27% 36%, rgba(255, 190, 116, 0.7), rgba(255, 211, 158, 0.34) 46%, transparent 72%),
    radial-gradient(ellipse 30rem 21rem at 50% 38%, rgba(255, 249, 240, 0.92), rgba(255, 249, 240, 0.6) 50%, transparent 76%);
}

.backdrop__photo {
  position: absolute;
  top: 0;
  display: block;
  height: 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.backdrop__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.backdrop__photo--coast {
  left: 0;
  width: min(38vw, 36rem);
  top: 3.5rem;
  height: calc(100% - 3.5rem);
  opacity: 0.85;
  /* clear sky above for the logo, fading out towards the hero copy and the cards */
  -webkit-mask-image: linear-gradient(90deg, #000 18%, transparent 94%), linear-gradient(180deg, transparent 0, #000 26%, #000 46%, transparent 92%);
  mask-image: linear-gradient(90deg, #000 18%, transparent 94%), linear-gradient(180deg, transparent 0, #000 26%, #000 46%, transparent 92%);
}
.backdrop__photo--coast img {
  object-position: left center;
}
.backdrop__photo--glow {
  right: 0;
  width: min(42vw, 41rem);
  -webkit-mask-image: linear-gradient(270deg, #000 42%, transparent 98%), linear-gradient(180deg, #000 44%, transparent 94%);
  mask-image: linear-gradient(270deg, #000 42%, transparent 98%), linear-gradient(180deg, #000 44%, transparent 94%);
}
.backdrop__photo--glow img {
  object-position: 62% top;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(1.1rem, 2.2vw, 2rem) calc(var(--gutter) + 0.5rem) 0;
}

.site-header__brand {
  flex: none;
  border-radius: 0.25rem;
}
.site-header__brand img {
  width: clamp(8.5rem, 15vw, 13.5rem);
  height: auto;
}

.site-header__tag {
  position: relative;
  padding-bottom: 0.7rem;
  font-size: clamp(0.625rem, 0.5rem + 0.3vw, 0.8125rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}
.site-header__tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3.5rem;
  height: 2px;
  margin-left: calc(-1.75rem - 0.16em);
  background: var(--orange);
}

/* ---------- Hero ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  padding: clamp(1.5rem, 1.6vw, 1.75rem) 0 clamp(1.75rem, 2.4vw, 2.25rem);
  text-align: center;
}

.hero__eyebrow {
  font-size: clamp(0.72rem, 0.6rem + 0.45vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.4em;
  text-indent: 0.4em; /* optically re-centre tracked text */
  text-transform: uppercase;
}

.hero__title {
  margin-top: clamp(0.6rem, 1.2vw, 1.1rem);
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 1.5rem + 3.4vw, 4.5rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.hero__title::after {
  content: "";
  display: block;
  width: 3.75rem;
  height: 3px;
  margin: clamp(1.1rem, 1.8vw, 1.6rem) auto 0;
  border-radius: 2px;
  background: var(--orange);
}

.hero__lede {
  max-width: 42rem;
  margin: clamp(0.9rem, 1.5vw, 1.25rem) auto 0;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.625rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

/* ---------- Destination cards ---------- */
.destinations {
  display: grid;
  gap: 1.25rem;
}

.card {
  container: card / inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 3px solid #fff;
  border-radius: var(--radius-card);
  background: var(--cream-50);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 3px) calc(var(--radius-card) - 3px) 0 0;
  background: var(--sand-300);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.6rem 1.25rem 1.5rem;
  text-align: center;
}

.card__eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.card__title {
  margin-top: 0.35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 1.2rem + 1.4vw, 2.375rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.005em;
}

.card__text {
  margin-top: 0.3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-wrap: balance;
}

.card__actions {
  width: 100%;
  margin-block: auto;
  padding-top: 1.35rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: min(100%, 20.5rem);
  min-height: 3.25rem;
  margin-inline: auto;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--orange-cta);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(207, 67, 7, 0.65);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
/* Stretch the main link across the whole card so the photo and text are clickable too */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-card) - 3px);
}
.btn__icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.card__domain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--orange-text);
}
.card__domain::before,
.card__domain::after {
  content: "";
  flex: 0 1 2.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
  }
  .card:hover .card__media img {
    transform: scale(1.035);
  }
  .card:hover .btn {
    background: var(--orange-cta-hover);
  }
  .card:hover .btn__icon {
    transform: translate(2px, -2px);
  }
}
.btn:active {
  background: var(--orange-cta-hover);
}

/* ---------- European language selector ---------- */
.languages {
  position: relative; /* sits above the card's stretched link */
  z-index: 1;
  align-self: stretch;
  margin: 1.25rem -0.75rem -1rem;
  padding: 0.8rem 0.6rem 0.6rem;
  border: 1px solid rgba(194, 64, 8, 0.08);
  border-radius: 0.95rem;
  background: var(--cream-200);
}

.languages__title {
  margin-bottom: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.languages__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.languages__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: 0.85rem;
  background: #fff;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(122, 62, 20, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}

.flag {
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(31, 22, 18, 0.12);
}

.languages__name,
.languages__path {
  display: block;
  line-height: 1.2;
}
.languages__name {
  font-size: 0.8rem;
  font-weight: 600;
}
.languages__path {
  margin-top: 0.1rem;
  font-size: 0.66rem;
  color: var(--ink-soft);
}

@media (hover: hover) {
  .languages__link:hover {
    border-color: var(--orange);
    box-shadow: 0 8px 16px -8px rgba(207, 67, 7, 0.45);
    transform: translateY(-2px);
  }
}
.languages__link:active {
  border-color: var(--orange);
  background: var(--cream-50);
}

/* Four across once the card is wide enough */
@container card (min-width: 27rem) {
  .languages__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }
  .languages__link {
    gap: 0.4rem;
    padding-inline: 0.3rem;
  }
  .flag {
    width: 1.375rem;
    height: 1.375rem;
  }
  .languages__name {
    font-size: 0.75rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(1.5rem, 2.4vw, 2rem) var(--gutter) clamp(1.25rem, 2vw, 1.75rem);
  text-align: center;
}

.site-footer__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--orange-text);
}
.site-footer__mark::before,
.site-footer__mark::after {
  content: "";
  width: min(9rem, 26vw);
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.site-footer__mark svg {
  width: 2.25rem;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.site-footer__text {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.site-footer__text span {
  margin-inline: 0.75em;
  opacity: 0.6;
}

/* ---------- Tablet: horizontal cards ---------- */
@media (min-width: 40rem) and (max-width: 63.999rem) {
  .card {
    flex-direction: row;
  }
  .card__media {
    flex: 0 0 42%;
    aspect-ratio: auto;
    min-height: 15rem;
    border-radius: calc(var(--radius-card) - 3px) 0 0 calc(var(--radius-card) - 3px);
  }
  .card__body {
    container: card / inline-size;
    justify-content: center;
    padding: 1.75rem 1.5rem;
  }
  .card__actions {
    margin-block: 0;
  }
  .languages {
    margin: 1.25rem 0 0;
  }
}

/* ---------- Desktop: three across ---------- */
@media (min-width: 64rem) {
  .destinations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.9rem, 1.4vw, 1.25rem);
  }
  .card__media {
    aspect-ratio: 16 / 9;
  }
  .card--europe .card__media img {
    object-position: center 35%;
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 47.999rem) {
  .backdrop {
    height: 23rem;
  }
  .backdrop::after {
    background: radial-gradient(ellipse 15rem 10rem at 42% 50%, rgba(255, 249, 240, 0.9), rgba(255, 249, 240, 0.55) 55%, transparent 82%);
  }
  .backdrop__photo--coast {
    display: none;
  }
  .backdrop__photo--glow {
    width: min(86vw, 26rem);
    opacity: 0.95;
    -webkit-mask-image: linear-gradient(270deg, #000 20%, transparent 96%), linear-gradient(180deg, #000 30%, transparent 88%);
    mask-image: linear-gradient(270deg, #000 20%, transparent 96%), linear-gradient(180deg, #000 30%, transparent 88%);
  }
  .site-header {
    padding-inline: var(--gutter);
  }
  .site-header__tag {
    letter-spacing: 0.24em;
  }
  .site-header__tag::after {
    width: 2.5rem;
    margin-left: calc(-1.25rem - 0.12em);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .card:hover,
  .card:hover .card__media img,
  .card:hover .btn__icon,
  .languages__link:hover {
    transform: none;
  }
}
