/* ============================================================
   Granda Oliva — coming soon
   All colour, spacing and type values are declared once here
   and referenced below. Layout uses CSS logical properties so
   an Arabic RTL version is a stylesheet change, not a rewrite.
   ============================================================ */

:root {
  /* Colour — sampled from the logo artwork (slate-teal line work) */
  --c-ink:        #1E3439;  /* headings, wordmark */
  --c-brand:      #2C4A52;  /* logo teal — links, button fill */
  --c-brand-dark: #1B3238;  /* button hover */
  --c-muted:      #4E6469;  /* secondary text — 5.6:1 on --c-bg */
  --c-bg:         #F5F2EC;  /* warm off-white page field */
  --c-surface:    #FFFFFF;
  --c-rule:       #C9CFC9;  /* hairlines */
  --c-focus:      #A8541F;  /* focus ring — deliberately not brand teal */

  /* Spacing — 8px base */
  --s-1: 0.5rem;   /*  8px */
  --s-2: 1rem;     /* 16px */
  --s-3: 1.5rem;   /* 24px */
  --s-4: 2rem;     /* 32px */
  --s-5: 3rem;     /* 48px */
  --s-6: 4rem;     /* 64px */
  --s-7: 6rem;     /* 96px */

  /* Type */
  --font: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   1.125rem;
  --t-lg:   1.375rem;
  --t-xl:   clamp(2rem, 9vw, 4.5rem);   /* wordmark */

  --track-wide:  0.18em;
  --track-wider: 0.32em;

  --measure: 34ch;
  --radius: 999px;
  --dur: 200ms;
}

/* ---------- reset ---------- */

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

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

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--t-base);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--s-2);
  z-index: 10;
  padding: var(--s-1) var(--s-2);
  background-color: var(--c-surface);
  color: var(--c-ink);
  font-size: var(--t-sm);
  text-decoration: none;
}

.skip-link:focus-visible { inset-block-start: var(--s-2); }

/* ---------- shell ---------- */

.frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-inline: var(--s-3);
  padding-block: var(--s-4);
  text-align: center;
}

.masthead { padding-block-end: var(--s-5); }

.stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
}

/* ---------- hairline mark ---------- */

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
}

.mark__rule {
  inline-size: clamp(2.5rem, 12vw, 5rem);
  block-size: 1px;
  background-color: var(--c-rule);
}

.mark__dot {
  inline-size: 5px;
  block-size: 5px;
  background-color: var(--c-brand);
  transform: rotate(45deg);
}

/* ---------- brand ---------- */

/* Letter-spacing appends a trailing space after the final glyph, so a tracked
   word sits visually left of centre. Matching the tracking as leading padding
   restores optical balance. Do NOT use auto + negative margins here: on a flex
   item the auto start-margin eats all free space and slams the word right. */
.wordmark {
  padding-inline-start: var(--track-wide);
  font-size: var(--t-xl);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--c-ink);
}

.status {
  padding-inline-start: var(--track-wider);
  font-size: var(--t-base);
  font-weight: 400;
  letter-spacing: var(--track-wider);
  text-transform: uppercase;
  color: var(--c-brand);
}

.lede {
  max-inline-size: var(--measure);
  margin-inline: auto;
  font-size: var(--t-md);
  color: var(--c-muted);
  text-wrap: balance;
}

/* ---------- contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  inline-size: 100%;
  margin-block-start: var(--s-4);
  padding-block-start: var(--s-5);
  border-block-start: 1px solid var(--c-rule);
  max-inline-size: 36rem;
}

.contact__heading {
  padding-inline-start: var(--track-wide);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--c-muted);
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  inline-size: 100%;
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact__label {
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.contact__link {
  font-size: var(--t-md);
  color: var(--c-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur) ease;
  /* deliberately NOT overflow-wrap:anywhere — an address broken as
     "info@grandaoliva.c / om" is worse than a slightly wider column.
     The container widths below guarantee it fits from 320px up. */
}

.contact__link:hover { color: var(--c-brand-dark); }

/* ---------- copy to clipboard ---------- */

.contact__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
}

.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 32px visible, but the ::after below pads the hit area out to 44px */
  position: relative;
  inline-size: 32px;
  block-size: 32px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--c-rule);
  border-radius: 6px;
  background-color: transparent;
  color: var(--c-muted);
  font: inherit;
  cursor: pointer;
  transition: color var(--dur) ease, border-color var(--dur) ease, background-color var(--dur) ease;
}

.copy::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.copy:hover {
  color: var(--c-brand);
  border-color: var(--c-brand);
  background-color: var(--c-surface);
}

.copy__icon {
  inline-size: 16px;
  block-size: 16px;
}

/* success + failure states, driven by the script */
.copy.is-copied {
  color: var(--c-surface);
  border-color: var(--c-brand);
  background-color: var(--c-brand);
}

.copy.is-failed {
  color: var(--c-focus);
  border-color: var(--c-focus);
}

/* swap the clipboard glyph for a tick once copied.
   Two paths toggled by class — the CSS `d:` property is Chromium-only. */
.copy__glyph--tick { display: none; }
.copy.is-copied .copy__glyph--clip { display: none; }
.copy.is-copied .copy__glyph--tick { display: inline; }

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- WhatsApp button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-block-size: 48px;
  /* tight enough that the label stays on one line at 320px */
  padding-inline: var(--s-3);
  padding-block: var(--s-2);
  border-radius: var(--radius);
  background-color: var(--c-brand);
  color: var(--c-surface);   /* 9.5:1 on --c-brand */
  font-size: var(--t-base);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color var(--dur) ease, transform var(--dur) ease;
}

.btn:hover { background-color: var(--c-brand-dark); }
.btn:active { transform: translateY(1px); }

.btn__icon {
  inline-size: 20px;
  block-size: 20px;
  flex-shrink: 0;
}

.contact__number {
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

/* ---------- footer ---------- */

.footer {
  padding-block-start: var(--s-6);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

/* ---------- focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- larger screens ---------- */

@media (min-width: 40em) {
  .frame { padding-inline: var(--s-5); padding-block: var(--s-6); }

  .btn { padding-inline: var(--s-4); }

  .contact__list {
    flex-direction: row;
    justify-content: center;
    gap: var(--s-5);
  }

  .contact__item { align-items: center; }
}

@media (min-width: 64em) {
  .frame { padding-block: var(--s-7); }
  .lede { font-size: var(--t-lg); }
}

/* ---------- motion ---------- */

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