/* =============================================================================
   Constanța — One coast. Three ways to fall for it.
   Student project for Business Communication in English.

   Contents
     1. Tokens
     2. Reset and base
     3. Shared pieces (shell, eyebrow, buttons, focus)
     4. Header and navigation
     5. Hero and the audience chooser
     6. Audience panels (days, facts) + per-audience accents
     7. Why Constanța
     8. Gallery
     9. Getting here
    10. Call to action
    11. Footer
    12. Motion preferences
   ========================================================================== */


/* 1. TOKENS ================================================================ */

:root {
  /* Brand palette, taken from the place */
  --navy:   #0E3B5C;  /* main text, dark sections       */
  --sea:    #1F6FA3;  /* links, primary accents         */
  --sand:   #F5EDE0;  /* page background                */
  --orange: #E0703A;  /* decoration only — never text   */
  --white:  #FFFFFF;

  /* Derived shades, added so every text pair clears WCAG AA.
     Measured against their own backgrounds:
       ember on sand  5.14:1    slate on sand 5.84:1
       ember on white 5.98:1    sky on navy   7.08:1                        */
  --ember: #A14A1E;   /* darkened orange, safe for text */
  --slate: #3A5F79;   /* muted secondary text           */
  --sky:   #9FD0EE;   /* labels/links inside navy bands */

  /* Washes, used for surfaces only */
  --navy-12: rgba(14, 59, 92, .12);
  --navy-08: rgba(14, 59, 92, .08);

  /* Default accent; each audience panel overrides it (section 6) */
  --accent: var(--ember);
  --tint: rgba(224, 112, 58, .07);
  --hero-pick: var(--orange);

  /* Type. The second stack in each is the no-webfont fallback. */
  --font-head: "Space Grotesk", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Fluid heading scale */
  --step-h1: clamp(2.25rem, 1.35rem + 4.6vw, 4.75rem);
  --step-h2: clamp(1.6rem, 1.15rem + 2.1vw, 2.75rem);
  --step-h3: clamp(1.1rem, 1rem + .42vw, 1.35rem);
  --step-lead: clamp(1.02rem, .97rem + .42vw, 1.25rem);

  --shell: 1200px;
  --gutter: clamp(1.15rem, .7rem + 2.2vw, 2.5rem);
  --block: clamp(3.5rem, 2.4rem + 4.6vw, 6.5rem);  /* section padding */
  --radius: 4px;
}


/* 2. RESET AND BASE ======================================================== */

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

html {
  scroll-behavior: smooth;
  /* Anchors land below the sticky header */
  scroll-padding-top: 5.25rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  /* Nothing may overflow sideways at any width */
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.015em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--navy); }

/* Placeholder figures still to be verified — deliberately visible */
.todo {
  display: inline-block;
  padding: .1em .45em;
  border-bottom: 2px solid var(--orange);
  background: var(--tint);
  color: var(--ember);
  font-size: .9em;
  font-weight: 600;
}


/* 3. SHARED PIECES ========================================================= */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Skip link: visible as soon as it takes focus */
.skip-link {
  position: absolute;
  top: -4rem;
  left: var(--gutter);
  z-index: 100;
  padding: .7rem 1.1rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: .6rem; color: var(--white); }

/* Small label above a heading */
.eyebrow {
  margin: 0 0 .7rem;
  color: var(--ember);
  font-size: .775rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow--light { color: var(--sky); }

.section-title {
  max-width: 24ch;
  margin-bottom: clamp(1.75rem, 1.2rem + 1.8vw, 3rem);
  font-size: var(--step-h2);
}
/* Hairline under section titles, in the decorative orange */
.section-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1.1rem;
  background: var(--orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* White on sea blue = 5.44:1 */
.btn--primary { background: var(--sea); color: var(--white); }
.btn--primary:hover { background: var(--white); color: var(--navy); transform: translateY(-2px); }

/* One visible focus treatment for everything interactive */
:is(a, button, [role="tab"], [tabindex]):focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On dark grounds the ring switches to sand so it stays visible */
:is(.hero, .cta, .site-footer) :is(a, button):focus-visible { outline-color: var(--sand); }


/* 4. HEADER AND NAVIGATION ================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--sand);
  border-bottom: 1px solid var(--navy-12);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--navy);
  text-decoration: none;
}
.wordmark__mark { width: 1.75rem; height: 1.75rem; flex: none; }
.wordmark__text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem);
  letter-spacing: .08em;
}

/* --- Mobile: nav collapses behind a button ------------------------------- */

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--navy-12);
  border-radius: var(--radius);
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__icon { width: 1.35rem; height: 1.35rem; }
.nav-toggle__icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--close { display: block; }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--sand);
  border-bottom: 1px solid var(--navy-12);
  box-shadow: 0 14px 28px rgba(14, 59, 92, .12);
}
/* JS flips this class on the header; without JS the links are always shown */
.site-header.nav-open .site-nav { display: block; }

.site-nav__list { padding: .5rem var(--gutter) 1rem; }
.site-nav__list a {
  display: block;
  padding: .8rem 0;
  border-bottom: 1px solid var(--navy-08);
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}
.site-nav__list li:last-child a { border-bottom: 0; }
.site-nav__list a:hover { color: var(--sea); }

/* No-JS fallback: show the links inline, hide the button.
   script.js removes .no-js from <html> as soon as it runs. */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { position: static; display: block; border: 0; box-shadow: none; }
.no-js .site-header__inner { flex-wrap: wrap; }

/* --- From 820px up: ordinary horizontal nav ------------------------------ */

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav__list { display: flex; gap: clamp(1.1rem, .4rem + 1.6vw, 2.1rem); padding: 0; }
  .site-nav__list a {
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    font-size: .95rem;
  }
  .site-nav__list a:hover { border-bottom-color: var(--orange); color: var(--navy); }
}


/* 5. HERO AND THE AUDIENCE CHOOSER ========================================= */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  /* Tall enough to feel like a destination, short enough that the three
     audience buttons stay on screen at 375px without scrolling. */
  min-height: min(32rem, 92svh);
  padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(2.25rem, 1.5rem + 3vw, 4rem);
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  /* Lift the photo slightly so the building still reads through the scrim */
  filter: brightness(1.12) saturate(1.06);
}

/* Navy scrim over the photo.
   Mobile: vertical, darkest at the bottom where the text and buttons sit. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(14, 59, 92, .93) 0%,
      rgba(14, 59, 92, .88) 42%,
      rgba(14, 59, 92, .78) 68%,
      rgba(14, 59, 92, .55) 100%);
}

/* From 820px the text occupies the left of the hero, so the scrim can open
   up towards the right and let the Casino show. Measured on the rendered
   page, the lightest point under any text still clears its threshold. */
@media (min-width: 820px) {
  .hero::after {
    background:
      linear-gradient(to right,
        rgba(14, 59, 92, .93) 0%,
        rgba(14, 59, 92, .90) 45%,
        rgba(14, 59, 92, .74) 74%,
        rgba(14, 59, 92, .42) 100%),
      linear-gradient(to top,
        rgba(14, 59, 92, .30) 0%,
        rgba(14, 59, 92, 0) 45%);
  }
}

.hero__inner { position: relative; z-index: 1; }

.hero__title {
  max-width: 20ch;
  font-size: var(--step-h1);
  text-wrap: balance;
}

.hero__sub {
  max-width: 48ch;
  margin-top: 1.1rem;
  margin-bottom: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  color: var(--white);
  font-size: var(--step-lead);
}

/* --- The chooser: three tabs ------------------------------------------- */

.chooser {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.chooser__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  /* 44px minimum touch target */
  min-height: 48px;
  padding: .7rem 1.1rem;
  border: 2px solid rgba(245, 237, 224, .55);
  border-radius: 999px;
  background: rgba(14, 59, 92, .55);
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(.875rem, .83rem + .2vw, .975rem);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.chooser__icon { width: 1.2rem; height: 1.2rem; flex: none; }

.chooser__btn:hover { border-color: var(--white); background: rgba(14, 59, 92, .78); }

/* Selected tab: sand fill with navy text (9.70:1) and an accent underline
   that changes per audience, so the targeting reads at a glance. */
.chooser__btn[aria-selected="true"] {
  position: relative;
  border-color: var(--sand);
  background: var(--sand);
  color: var(--navy);
}
/* The bar sits INSIDE the sand pill, not below it. On the hero scrim the
   lighter accents dropped as low as 1.4:1; against sand all three clear 3:1
   (ember 5.14, sea 4.68, navy 10.05). */
.chooser__btn[aria-selected="true"] { padding-bottom: 1.05rem; }
.chooser__btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .4rem;
  width: 2.25rem;
  height: 3px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: var(--hero-pick);
}

/* Each audience gets its own highlight, matching that audience's section
   accent further down the page. All three stay inside the palette. */
.chooser__btn[data-audience="couples"][aria-selected="true"]::after  { background: var(--ember); }
.chooser__btn[data-audience="families"][aria-selected="true"]::after { background: var(--sea); }
.chooser__btn[data-audience="students"][aria-selected="true"]::after { background: var(--navy); }


/* 6. AUDIENCE PANELS ======================================================= */

.trip {
  position: relative;
  padding-block: var(--block);
  /* Accent tint for the whole section, set per audience below */
  background:
    linear-gradient(var(--tint), var(--tint)),
    var(--sand);
}
/* A thin accent rule across the top of the section */
.trip::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

/* --- Per-audience accents ---------------------------------------------- */

.trip[data-audience="couples"] {
  --accent: var(--ember);
  --tint: rgba(224, 112, 58, .075);
}
.trip[data-audience="families"] {
  --accent: var(--sea);
  --tint: rgba(31, 111, 163, .07);
}
.trip[data-audience="students"] {
  --accent: var(--navy);
  --tint: rgba(14, 59, 92, .07);
}
/* The eyebrow and "Day N" labels follow the accent */
.trip .eyebrow, .day__n { color: var(--accent); }

/* --- Crossfade between panels ------------------------------------------ */

.panel { opacity: 1; }
.js .panel { transition: opacity .28s ease; }
.js .panel.is-fading { opacity: 0; }

/* All three panels live in the HTML so the page works without scripting.
   When JS is on, show only the default one in the gap between first paint
   and script.js initialising; after that the hidden attribute takes over
   and .is-ready lifts this rule. */
.js .trip:not(.is-ready) #panel-families,
.js .trip:not(.is-ready) #panel-students { display: none; }

/* Without JS all three panels are visible, one after another, each clearly
   labelled by its own eyebrow and H2. */
.no-js .panel + .panel { margin-top: var(--block); padding-top: var(--block); border-top: 2px solid var(--navy-12); }

.panel__title {
  max-width: 28ch;
  font-size: var(--step-h2);
}
.panel__intro {
  max-width: 56ch;
  margin-top: 1rem;
  color: var(--slate);
  font-size: var(--step-lead);
}

/* --- Day cards --------------------------------------------------------- */

.days {
  display: grid;
  gap: clamp(1.25rem, .9rem + 1.4vw, 2rem);
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.25rem);
}
@media (min-width: 680px) { .days { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .days { grid-template-columns: repeat(3, 1fr); } }

.day {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 var(--navy-12), 0 12px 24px -18px rgba(14, 59, 92, .55);
}

.day__photo {
  width: 100%;
  height: clamp(11rem, 8rem + 14vw, 14.5rem);
  object-fit: cover;
}

.day__body {
  padding: clamp(1.15rem, 1rem + .6vw, 1.6rem);
  /* Accent hairline between photo and text */
  border-top: 3px solid var(--accent);
}

.day__n {
  margin-bottom: .35rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.day__title { margin-bottom: .55rem; font-size: var(--step-h3); }
.day__body p:last-child { color: var(--slate); }

/* --- The three info boxes ---------------------------------------------- */

.facts {
  display: grid;
  gap: clamp(1rem, .8rem + .9vw, 1.5rem);
  margin-top: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
}
@media (min-width: 680px) { .facts { grid-template-columns: repeat(3, 1fr); } }

.fact {
  padding: clamp(1.1rem, 1rem + .5vw, 1.5rem);
  border: 1px solid var(--navy-12);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
}
.fact__icon { width: 1.6rem; height: 1.6rem; margin-bottom: .7rem; color: var(--accent); }
.fact__title {
  margin-bottom: .35rem;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fact p { font-size: 1.0rem; }


/* 7. WHY CONSTANȚA ========================================================= */

.why { padding-block: var(--block); }

.tiles { display: grid; gap: clamp(1.25rem, .9rem + 1.4vw, 2rem); }
@media (min-width: 620px)  { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.tile { display: flex; flex-direction: column; }
.tile__photo {
  width: 100%;
  height: clamp(10rem, 7.5rem + 12vw, 13rem);
  border-radius: var(--radius);
  object-fit: cover;
}
.tile__body { padding-top: 1.1rem; }
.tile__title {
  margin-bottom: .5rem;
  font-size: var(--step-h3);
  /* Short orange tick above each tile heading */
  padding-top: .9rem;
  border-top: 3px solid var(--orange);
  display: block;
}
.tile__body p { color: var(--slate); }


/* 8. GALLERY =============================================================== */

.gallery {
  padding-block: var(--block);
  background: var(--white);
}

.shots { display: grid; gap: clamp(1.25rem, .9rem + 1.4vw, 2rem); }
@media (min-width: 620px) { .shots { grid-template-columns: repeat(2, 1fr); } }

.shot figure { margin: 0; }
.shot img {
  width: 100%;
  height: clamp(13rem, 9rem + 20vw, 20rem);
  border-radius: var(--radius);
  object-fit: cover;
}
.shot figcaption {
  padding-top: .8rem;
  color: var(--slate);
  font-size: .95rem;
}


/* 9. GETTING HERE ========================================================== */

.getting { padding-block: var(--block); }

.cols { display: grid; gap: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(3, 1fr); } }

.col { padding-top: 1.25rem; border-top: 3px solid var(--orange); }
.col__icon { width: 2rem; height: 2rem; margin-bottom: .9rem; color: var(--sea); }
.col__title { margin-bottom: .6rem; font-size: var(--step-h3); }
.col p { color: var(--slate); }


/* 10. CALL TO ACTION ======================================================= */

.cta {
  padding-block: clamp(3.25rem, 2.4rem + 4vw, 6rem);
  background: var(--navy);
  color: var(--white);
}
/* The measure is set on the text, not on the shell, so the CTA keeps the
   same left edge as every other section. */
.cta__title, .cta__sub { max-width: 30ch; }
.cta__title { font-size: var(--step-h2); }
.cta__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1.1rem;
  background: var(--orange);
}
.cta__sub {
  margin-top: 1.1rem;
  margin-bottom: 1.9rem;
  color: var(--sand);
  font-size: var(--step-lead);
}


/* 11. FOOTER =============================================================== */

.site-footer {
  padding-block: clamp(2.5rem, 2rem + 2.4vw, 4rem);
  background: #0A2E48;            /* one step darker than navy, sand text = 11.0:1 */
  color: var(--sand);
  font-size: .9rem;
}
.site-footer__note {
  max-width: 44ch;
  margin-bottom: 2rem;
  font-family: var(--font-head);
  font-size: clamp(1rem, .95rem + .4vw, 1.2rem);
  line-height: 1.35;
}
.site-footer__heading {
  margin-bottom: .9rem;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sky);
}
.credits {
  display: grid;
  gap: .4rem;
  color: rgba(245, 237, 224, .92);
  font-size: .85rem;
  line-height: 1.5;
}
@media (min-width: 760px) { .credits { grid-template-columns: repeat(2, 1fr); column-gap: 2.5rem; } }
.credits a { color: var(--sky); }
.credits a:hover { color: var(--white); }


/* 12. MOTION PREFERENCES =================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* Swap panels instantly rather than fading */
  .js .panel { transition: none; }
}
